diff --git a/src/main/java/us/tastybento/bskyblock/database/managers/island/IslandCache.java b/src/main/java/us/tastybento/bskyblock/database/managers/island/IslandCache.java index 76e44029c..2e6130c15 100644 --- a/src/main/java/us/tastybento/bskyblock/database/managers/island/IslandCache.java +++ b/src/main/java/us/tastybento/bskyblock/database/managers/island/IslandCache.java @@ -388,22 +388,5 @@ public class IslandCache { public int size() { return islandsByLocation.size(); } - - /** - * Get if the cache contains this island - * @param island or uuid of owner - * @return true if it is in the cache - */ - public boolean contains(Object o) { - if (o instanceof UUID) { - return islandsByUUID.containsKey(o); - } - if (o instanceof Island) { - Island is = (Island)o; - if (is.getOwner() != null && islandsByUUID.containsKey(is.getOwner())) { - return true; - } - } - return false; - } + } diff --git a/src/main/java/us/tastybento/bskyblock/database/managers/island/IslandsManager.java b/src/main/java/us/tastybento/bskyblock/database/managers/island/IslandsManager.java index d13f573fc..6fe9e561b 100644 --- a/src/main/java/us/tastybento/bskyblock/database/managers/island/IslandsManager.java +++ b/src/main/java/us/tastybento/bskyblock/database/managers/island/IslandsManager.java @@ -671,7 +671,7 @@ public class IslandsManager { return true; } location = getClosestIsland(location); - if (islandCache.contains(location)) { + if (islandCache.getIslandAt(location) != null) { return true; }