Merge pull request #2526 from BentoBoxWorld/oraxen

Oraxen
This commit is contained in:
tastybento 2024-10-02 08:02:06 -07:00 committed by GitHub
commit 81fb17d90e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -1359,7 +1359,7 @@ public class IslandsManager {
/** /**
* Checks if a specific location is within the protected range of an island that * 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 player - the player
* @param loc - location * @param loc - location
@ -1370,7 +1370,9 @@ public class IslandsManager {
return false; return false;
} }
// Get the player's island // 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); .orElse(false);
} }

View File

@ -84,7 +84,6 @@ import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.AbstractDatabaseHandler; import world.bentobox.bentobox.database.AbstractDatabaseHandler;
import world.bentobox.bentobox.database.Database; import world.bentobox.bentobox.database.Database;
import world.bentobox.bentobox.database.DatabaseSetup; import world.bentobox.bentobox.database.DatabaseSetup;
import world.bentobox.bentobox.database.DatabaseSetup.DatabaseType;
import world.bentobox.bentobox.database.objects.Island; import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.listeners.flags.AbstractCommonSetup; import world.bentobox.bentobox.listeners.flags.AbstractCommonSetup;
import world.bentobox.bentobox.lists.Flags; import world.bentobox.bentobox.lists.Flags;