diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Add.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Add.java index 038ecc9b7..956bd0f01 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Add.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Add.java @@ -64,9 +64,11 @@ public class Add extends Command { @Override // Success public void run() { for (UUID uuid : uuids) { - if (!plot.removeTrusted(uuid)) { - if (plot.getDenied().contains(uuid)) { - plot.removeDenied(uuid); + if (uuid != DBFunc.everyone) { + if (!plot.removeTrusted(uuid)) { + if (plot.getDenied().contains(uuid)) { + plot.removeDenied(uuid); + } } } plot.addMember(uuid); diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Deny.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Deny.java index bf8ba64d3..4a88676dd 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Deny.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Deny.java @@ -68,8 +68,10 @@ public class Deny extends SubCommand { MainUtil.sendMessage(player, C.ALREADY_ADDED, MainUtil.getName(uuid)); return false; } - plot.removeMember(uuid); - plot.removeTrusted(uuid); + if (uuid != DBFunc.everyone) { + plot.removeMember(uuid); + plot.removeTrusted(uuid); + } plot.addDenied(uuid); EventUtil.manager.callDenied(player, plot, uuid, true); if (!uuid.equals(DBFunc.everyone)) { diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Trust.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Trust.java index 0a88deeed..768b2b09a 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Trust.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Trust.java @@ -64,9 +64,11 @@ public class Trust extends Command { @Override // Success public void run() { for (UUID uuid : uuids) { - if (!plot.removeMember(uuid)) { - if (plot.getDenied().contains(uuid)) { - plot.removeDenied(uuid); + if (uuid != DBFunc.everyone) { + if (!plot.removeMember(uuid)) { + if (plot.getDenied().contains(uuid)) { + plot.removeDenied(uuid); + } } } plot.addTrusted(uuid); diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java index 5334b94b1..fd2874983 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -394,16 +394,17 @@ public class Plot { if (this.owner == null || getDenied().contains(uuid)) { return false; } - if (getTrusted().contains(uuid) || getTrusted().contains(DBFunc.everyone)) { - return true; - } if (isOwner(uuid)) { return true; } - if (getMembers().contains(uuid) || getMembers().contains(DBFunc.everyone)) { - if (isOnline()) { - return true; - } + if (getMembers().contains(uuid)) { + return isOnline(); + } + if (getTrusted().contains(uuid) || getTrusted().contains(DBFunc.everyone)) { + return true; + } + if (getMembers().contains(DBFunc.everyone)) { + return isOnline(); } return false; }