mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 11:13:45 +01:00 
			
		
		
		
	Fixed invalid biome error
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user