From e3f5842299def8f5c7ad2a0684a0a5feae6a8cb6 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 27 Mar 2016 07:31:35 +1100 Subject: [PATCH] Recover from invalid db entry --- .../database/plotme/ClassicPlotMeConnector.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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); + } } }