mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 05:36: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>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>PlotSquared</artifactId>
|
<artifactId>PlotSquared</artifactId>
|
||||||
<version>2.8.11</version>
|
<version>2.8.12</version>
|
||||||
<name>PlotSquared</name>
|
<name>PlotSquared</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
|
@ -242,12 +242,17 @@ public class BukkitUtil extends BlockManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getBiomeFromString(final String biomeStr) {
|
public int getBiomeFromString(final String biomeStr) {
|
||||||
|
try {
|
||||||
final Biome biome = Biome.valueOf(biomeStr.toUpperCase());
|
final Biome biome = Biome.valueOf(biomeStr.toUpperCase());
|
||||||
if (biome == null) {
|
if (biome == null) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return Arrays.asList(Biome.values()).indexOf(biome);
|
return Arrays.asList(Biome.values()).indexOf(biome);
|
||||||
}
|
}
|
||||||
|
catch (IllegalArgumentException e) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getBiomeList() {
|
public String[] getBiomeList() {
|
||||||
|
Loading…
Reference in New Issue
Block a user