diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java index 47f1dfc7e..c22b63f00 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java @@ -202,8 +202,12 @@ public class ClassicPlotMeConnector extends APlotMeConnector { continue; } } - if (plots.get(world).containsKey(id)) { - plots.get(world).get(id).getDenied().add(denied); + HashMap worldMap = plots.get(world); + if (worldMap != null) { + Plot plot = worldMap.get(id); + if (plot != null) { + plot.getDenied().add(denied); + } } } @@ -242,8 +246,12 @@ public class ClassicPlotMeConnector extends APlotMeConnector { continue; } } - if (plots.get(world).containsKey(id)) { - plots.get(world).get(id).getTrusted().add(helper); + HashMap worldMap = plots.get(world); + if (worldMap != null) { + Plot plot = worldMap.get(id); + if (plot != null) { + plot.getTrusted().add(helper); + } } }