diff --git a/src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java b/src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java index 14c81f30e..f21099781 100644 --- a/src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java @@ -155,7 +155,11 @@ public class IslandWorldManager { * @return world settings, or null if world is unknown */ public WorldSettings getWorldSettings(World world) { - return gameModes.get(Util.getWorld(world)).getWorldSettings(); + if (gameModes.containsKey(Util.getWorld(world))) { + return gameModes.get(Util.getWorld(world)).getWorldSettings(); + } else { + return null; + } } /**