Skip to content

Commit 81fb17d

Browse files
authored
Merge pull request #2526 from BentoBoxWorld/oraxen
Oraxen
2 parents 6d8ac15 + 1782dd6 commit 81fb17d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/world/bentobox/bentobox/managers/IslandsManager.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@ boolean fixIslandCenter(Island island) {
13591359

13601360
/**
13611361
* Checks if a specific location is within the protected range of an island that
1362-
* the player is a member of (owner or member)
1362+
* the player is a member of (owner or member) or Op.
13631363
*
13641364
* @param player - the player
13651365
* @param loc - location
@@ -1370,7 +1370,9 @@ public boolean locationIsOnIsland(Player player, Location loc) {
13701370
return false;
13711371
}
13721372
// Get the player's island
1373-
return getIslandAt(loc).filter(i -> i.onIsland(loc)).map(i -> i.inTeam(player.getUniqueId()))
1373+
// If Op then all islands are Ops
1374+
return player.isOp()
1375+
|| getIslandAt(loc).filter(i -> i.onIsland(loc)).map(i -> i.inTeam(player.getUniqueId()))
13741376
.orElse(false);
13751377
}
13761378

src/test/java/world/bentobox/bentobox/managers/IslandsManagerTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
import world.bentobox.bentobox.database.AbstractDatabaseHandler;
8585
import world.bentobox.bentobox.database.Database;
8686
import world.bentobox.bentobox.database.DatabaseSetup;
87-
import world.bentobox.bentobox.database.DatabaseSetup.DatabaseType;
8887
import world.bentobox.bentobox.database.objects.Island;
8988
import world.bentobox.bentobox.listeners.flags.AbstractCommonSetup;
9089
import world.bentobox.bentobox.lists.Flags;

0 commit comments

Comments
 (0)