From a7f9f21e655d37bb304c09341d6c4572410aaa7c Mon Sep 17 00:00:00 2001 From: tastybento Date: Wed, 2 Oct 2024 07:42:28 -0700 Subject: [PATCH 1/2] Make all islands Op's --- .../world/bentobox/bentobox/managers/IslandsManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java index 3c303572b..f3cfaf0fc 100644 --- a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java @@ -1359,7 +1359,7 @@ boolean fixIslandCenter(Island island) { /** * Checks if a specific location is within the protected range of an island that - * the player is a member of (owner or member) + * the player is a member of (owner or member) or Op. * * @param player - the player * @param loc - location @@ -1370,7 +1370,9 @@ public boolean locationIsOnIsland(Player player, Location loc) { return false; } // Get the player's island - return getIslandAt(loc).filter(i -> i.onIsland(loc)).map(i -> i.inTeam(player.getUniqueId())) + // If Op then all islands are Ops + return player.isOp() + || getIslandAt(loc).filter(i -> i.onIsland(loc)).map(i -> i.inTeam(player.getUniqueId())) .orElse(false); } From 1782dd666f50bbdb639458b7411f18e94f89d2ed Mon Sep 17 00:00:00 2001 From: tastybento Date: Wed, 2 Oct 2024 07:47:03 -0700 Subject: [PATCH 2/2] Remove unused imports --- .../world/bentobox/bentobox/managers/IslandsManagerTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/world/bentobox/bentobox/managers/IslandsManagerTest.java b/src/test/java/world/bentobox/bentobox/managers/IslandsManagerTest.java index fc2967a0d..d31f95b7b 100644 --- a/src/test/java/world/bentobox/bentobox/managers/IslandsManagerTest.java +++ b/src/test/java/world/bentobox/bentobox/managers/IslandsManagerTest.java @@ -84,7 +84,6 @@ import world.bentobox.bentobox.database.AbstractDatabaseHandler; import world.bentobox.bentobox.database.Database; import world.bentobox.bentobox.database.DatabaseSetup; -import world.bentobox.bentobox.database.DatabaseSetup.DatabaseType; import world.bentobox.bentobox.database.objects.Island; import world.bentobox.bentobox.listeners.flags.AbstractCommonSetup; import world.bentobox.bentobox.lists.Flags;