Skip to content

Commit

Permalink
Merge pull request #2526 from BentoBoxWorld/oraxen
Browse files Browse the repository at this point in the history
Oraxen
  • Loading branch information
tastybento authored Oct 2, 2024
2 parents 6d8ac15 + 1782dd6 commit 81fb17d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 81fb17d

Please sign in to comment.