From 5b3426f4ac36fa893aecbe1574eba5e0bbc626ff Mon Sep 17 00:00:00 2001 From: 56738 <56738mc@gmail.com> Date: Mon, 9 Sep 2019 18:44:36 +0200 Subject: [PATCH] Make removing * remove the Everyone node before removing all members --- .../plotsquared/plot/commands/Remove.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Remove.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Remove.java index 875eb6e4c..038355d83 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Remove.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Remove.java @@ -66,18 +66,7 @@ import java.util.UUID; Set uuids = MainUtil.getUUIDsFromString(args[0]); if (!uuids.isEmpty()) { for (UUID uuid : uuids) { - if (uuid == DBFunc.EVERYONE) { - if (plot.removeTrusted(uuid)) { - EventUtil.manager.callTrusted(player, plot, uuid, false); - count++; - } else if (plot.removeMember(uuid)) { - EventUtil.manager.callMember(player, plot, uuid, false); - count++; - } else if (plot.removeDenied(uuid)) { - EventUtil.manager.callDenied(player, plot, uuid, false); - count++; - } - } else if (plot.getTrusted().contains(uuid)) { + if (plot.getTrusted().contains(uuid)) { if (plot.removeTrusted(uuid)) { EventUtil.manager.callTrusted(player, plot, uuid, false); count++; @@ -92,6 +81,17 @@ import java.util.UUID; EventUtil.manager.callDenied(player, plot, uuid, false); count++; } + } else if (uuid == DBFunc.EVERYONE) { + if (plot.removeTrusted(uuid)) { + EventUtil.manager.callTrusted(player, plot, uuid, false); + count++; + } else if (plot.removeMember(uuid)) { + EventUtil.manager.callMember(player, plot, uuid, false); + count++; + } else if (plot.removeDenied(uuid)) { + EventUtil.manager.callDenied(player, plot, uuid, false); + count++; + } } } }