From 3e3754d335640eb3fc80f4de7e7ea3788b9e550e Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 2 Jun 2019 21:17:30 -0700 Subject: [PATCH] Removes home locations that are null --- .../java/world/bentobox/bentobox/database/objects/Players.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/database/objects/Players.java b/src/main/java/world/bentobox/bentobox/database/objects/Players.java index e7fb05b1c..75c4b8ca7 100644 --- a/src/main/java/world/bentobox/bentobox/database/objects/Players.java +++ b/src/main/java/world/bentobox/bentobox/database/objects/Players.java @@ -205,7 +205,7 @@ public class Players implements DataObject { * @param world - world */ public void clearHomeLocations(World world) { - homeLocations.keySet().removeIf(l -> l == null || Util.sameWorld(l.getWorld(), world)); + homeLocations.keySet().removeIf(l -> l == null || l.getWorld() == null || Util.sameWorld(l.getWorld(), world)); } /**