mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Merge pull request #2500 from 56738/remove-everyone
Make removing * remove the Everyone node before removing all members
This commit is contained in:
commit
26e851fcf1
@ -66,18 +66,7 @@ import java.util.UUID;
|
|||||||
Set<UUID> uuids = MainUtil.getUUIDsFromString(args[0]);
|
Set<UUID> uuids = MainUtil.getUUIDsFromString(args[0]);
|
||||||
if (!uuids.isEmpty()) {
|
if (!uuids.isEmpty()) {
|
||||||
for (UUID uuid : uuids) {
|
for (UUID uuid : uuids) {
|
||||||
if (uuid == DBFunc.EVERYONE) {
|
if (plot.getTrusted().contains(uuid)) {
|
||||||
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.removeTrusted(uuid)) {
|
if (plot.removeTrusted(uuid)) {
|
||||||
EventUtil.manager.callTrusted(player, plot, uuid, false);
|
EventUtil.manager.callTrusted(player, plot, uuid, false);
|
||||||
count++;
|
count++;
|
||||||
@ -92,6 +81,17 @@ import java.util.UUID;
|
|||||||
EventUtil.manager.callDenied(player, plot, uuid, false);
|
EventUtil.manager.callDenied(player, plot, uuid, false);
|
||||||
count++;
|
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++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user