Make all islands Op's

This commit is contained in:
tastybento 2024-10-02 07:42:28 -07:00
parent 6d8ac151b4
commit a7f9f21e65

View File

@ -1359,7 +1359,7 @@ public class IslandsManager {
/**
* 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 class IslandsManager {
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);
}