From 1bc354e49b6644a37f3bede16b3a35023b0b586a Mon Sep 17 00:00:00 2001 From: tastybento Date: Thu, 30 Jan 2020 09:25:42 -0800 Subject: [PATCH] Adds null check for nether and end worlds https://github.com/BentoBoxWorld/Limits/issues/64 --- src/main/java/world/bentobox/limits/commands/LimitPanel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/limits/commands/LimitPanel.java b/src/main/java/world/bentobox/limits/commands/LimitPanel.java index 785b874..c3d3613 100644 --- a/src/main/java/world/bentobox/limits/commands/LimitPanel.java +++ b/src/main/java/world/bentobox/limits/commands/LimitPanel.java @@ -141,13 +141,13 @@ public class LimitPanel { .filter(e -> e.getType().equals(ent)) .filter(e -> island.inIslandSpace(e.getLocation())).count(); // Nether - if (addon.getPlugin().getIWM().isNetherIslands(island.getWorld())) { + if (addon.getPlugin().getIWM().isNetherIslands(island.getWorld()) && addon.getPlugin().getIWM().getNetherWorld(island.getWorld()) != null) { count += addon.getPlugin().getIWM().getNetherWorld(island.getWorld()).getEntities().stream() .filter(e -> e.getType().equals(ent)) .filter(e -> island.inIslandSpace(e.getLocation())).count(); } // End - if (addon.getPlugin().getIWM().isEndIslands(island.getWorld())) { + if (addon.getPlugin().getIWM().isEndIslands(island.getWorld()) && addon.getPlugin().getIWM().getEndWorld(island.getWorld()) != null) { count += addon.getPlugin().getIWM().getEndWorld(island.getWorld()).getEntities().stream() .filter(e -> e.getType().equals(ent)) .filter(e -> island.inIslandSpace(e.getLocation())).count();