mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-17 21:02:20 +01:00
Made mod bypass permissions flags-specific & differenciated between everywhere and only on island
This is a 2 in 1 : #70 and #139. Those were long-awaited features. Now it's time for testing !
This commit is contained in:
parent
1455d6e7f5
commit
aab7d4a649
@ -144,8 +144,8 @@ public abstract class AbstractFlagListener implements Listener {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ops or bypass mods can do anything
|
||||
if (user.isOp() || user.hasPermission(getIWM().getPermissionPrefix(loc.getWorld()) + ".mod.bypassprotect")) {
|
||||
// Ops or "bypass everywhere" moderators can do anything
|
||||
if (user.isOp() || user.hasPermission(getIWM().getPermissionPrefix(loc.getWorld()) + ".mod.bypass." + flag.getID() + ".everywhere")) {
|
||||
user = null;
|
||||
return true;
|
||||
}
|
||||
@ -154,7 +154,8 @@ public abstract class AbstractFlagListener implements Listener {
|
||||
User.setPlugin(plugin);
|
||||
|
||||
if (island.isPresent()) {
|
||||
if (!island.get().isAllowed(user, flag)) {
|
||||
// If it is not allowed on the island, "bypass island" moderators can do anything
|
||||
if (!island.get().isAllowed(user, flag) && !user.hasPermission(getIWM().getPermissionPrefix(loc.getWorld()) + ".mod.bypass." + flag.getID() + ".island")) {
|
||||
noGo(e, flag, silent);
|
||||
// Clear the user for the next time
|
||||
user = null;
|
||||
|
Loading…
Reference in New Issue
Block a user