Skip to content

Commit

Permalink
Disable ability to load non-existing biomes (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jun 20, 2019
1 parent e5507f7 commit 80c4c33
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/world/bentobox/biomes/BiomesAddonManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,19 @@ private boolean loadBiomes(BiomesObject biome)
*/
public boolean loadBiomes(BiomesObject biome, boolean overwrite, User user, boolean silent)
{
// If biome is null, the skip this biome!
if (biome.getBiome() == null)
{
if (!silent)
{
user.sendMessage("biomes.messages.skipping",
"[biome]",
biome.toString());
}

return false;
}

// Contains in array list is not fast.. but list is not so large, so it is ok there.

if (this.biomesCacheData.containsKey(biome.getUniqueId()))
Expand Down

0 comments on commit 80c4c33

Please sign in to comment.