mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixed invalid biome error
This commit is contained in:
parent
1a3fe1426a
commit
5d91793395
@ -8,7 +8,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<artifactId>PlotSquared</artifactId>
|
||||
<version>2.8.11</version>
|
||||
<version>2.8.12</version>
|
||||
<name>PlotSquared</name>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
|
@ -242,11 +242,16 @@ public class BukkitUtil extends BlockManager {
|
||||
|
||||
@Override
|
||||
public int getBiomeFromString(final String biomeStr) {
|
||||
final Biome biome = Biome.valueOf(biomeStr.toUpperCase());
|
||||
if (biome == null) {
|
||||
try {
|
||||
final Biome biome = Biome.valueOf(biomeStr.toUpperCase());
|
||||
if (biome == null) {
|
||||
return -1;
|
||||
}
|
||||
return Arrays.asList(Biome.values()).indexOf(biome);
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
return -1;
|
||||
}
|
||||
return Arrays.asList(Biome.values()).indexOf(biome);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user