mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-30 00:56:45 +01:00
Fixes #265
This commit is contained in:
parent
9a9e00670c
commit
a205156ba3
@ -100,17 +100,22 @@ public class Denied extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
} else if (args[0].equalsIgnoreCase("remove")) {
|
} else if (args[0].equalsIgnoreCase("remove")) {
|
||||||
if (args[1].equalsIgnoreCase("*")) {
|
if (args[1].equalsIgnoreCase("*")) {
|
||||||
final UUID uuid = DBFunc.everyone;
|
if (plot.denied.size() == 0) {
|
||||||
if (!plot.denied.contains(uuid)) {
|
|
||||||
MainUtil.sendMessage(plr, C.WAS_NOT_ADDED);
|
MainUtil.sendMessage(plr, C.WAS_NOT_ADDED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
plot.removeDenied(uuid);
|
for (UUID uuid : plot.denied) {
|
||||||
DBFunc.removeDenied(loc.getWorld(), plot, uuid);
|
plot.removeDenied(uuid);
|
||||||
|
DBFunc.removeDenied(loc.getWorld(), plot, uuid);
|
||||||
|
}
|
||||||
MainUtil.sendMessage(plr, C.DENIED_REMOVED);
|
MainUtil.sendMessage(plr, C.DENIED_REMOVED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
final UUID uuid = UUIDHandler.getUUID(args[1]);
|
final UUID uuid = UUIDHandler.getUUID(args[1]);
|
||||||
|
if (!plot.denied.contains(uuid)) {
|
||||||
|
MainUtil.sendMessage(plr, C.WAS_NOT_ADDED);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
plot.removeDenied(uuid);
|
plot.removeDenied(uuid);
|
||||||
DBFunc.removeDenied(loc.getWorld(), plot, uuid);
|
DBFunc.removeDenied(loc.getWorld(), plot, uuid);
|
||||||
EventUtil.manager.callDenied(plr, plot, uuid, false);
|
EventUtil.manager.callDenied(plr, plot, uuid, false);
|
||||||
|
@ -91,17 +91,22 @@ public class Helpers extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
} else if (args[0].equalsIgnoreCase("remove")) {
|
} else if (args[0].equalsIgnoreCase("remove")) {
|
||||||
if (args[1].equalsIgnoreCase("*")) {
|
if (args[1].equalsIgnoreCase("*")) {
|
||||||
final UUID uuid = DBFunc.everyone;
|
if (plot.helpers.size() == 0) {
|
||||||
if (!plot.helpers.contains(uuid)) {
|
|
||||||
MainUtil.sendMessage(plr, C.WAS_NOT_ADDED);
|
MainUtil.sendMessage(plr, C.WAS_NOT_ADDED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
plot.removeHelper(uuid);
|
for (UUID uuid : plot.helpers) {
|
||||||
DBFunc.removeHelper(loc.getWorld(), plot, uuid);
|
plot.removeHelper(uuid);
|
||||||
|
DBFunc.removeHelper(loc.getWorld(), plot, uuid);
|
||||||
|
}
|
||||||
MainUtil.sendMessage(plr, C.HELPER_REMOVED);
|
MainUtil.sendMessage(plr, C.HELPER_REMOVED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
final UUID uuid = UUIDHandler.getUUID(args[1]);
|
final UUID uuid = UUIDHandler.getUUID(args[1]);
|
||||||
|
if (!plot.helpers.contains(uuid)) {
|
||||||
|
MainUtil.sendMessage(plr, C.WAS_NOT_ADDED);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
plot.removeHelper(uuid);
|
plot.removeHelper(uuid);
|
||||||
DBFunc.removeHelper(loc.getWorld(), plot, uuid);
|
DBFunc.removeHelper(loc.getWorld(), plot, uuid);
|
||||||
EventUtil.manager.callHelper(plr, plot, uuid, false);
|
EventUtil.manager.callHelper(plr, plot, uuid, false);
|
||||||
|
@ -92,17 +92,22 @@ public class Trusted extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
} else if (args[0].equalsIgnoreCase("remove")) {
|
} else if (args[0].equalsIgnoreCase("remove")) {
|
||||||
if (args[1].equalsIgnoreCase("*")) {
|
if (args[1].equalsIgnoreCase("*")) {
|
||||||
final UUID uuid = DBFunc.everyone;
|
if (plot.trusted.size() == 0) {
|
||||||
if (!plot.trusted.contains(uuid)) {
|
MainUtil.sendMessage(plr, C.WAS_NOT_ADDED);
|
||||||
MainUtil.sendMessage(plr, C.T_WAS_NOT_ADDED);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
plot.removeTrusted(uuid);
|
for (UUID uuid : plot.trusted) {
|
||||||
DBFunc.removeTrusted(loc.getWorld(), plot, uuid);
|
plot.removeTrusted(uuid);
|
||||||
|
DBFunc.removeTrusted(loc.getWorld(), plot, uuid);
|
||||||
|
}
|
||||||
MainUtil.sendMessage(plr, C.TRUSTED_REMOVED);
|
MainUtil.sendMessage(plr, C.TRUSTED_REMOVED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
final UUID uuid = UUIDHandler.getUUID(args[1]);
|
final UUID uuid = UUIDHandler.getUUID(args[1]);
|
||||||
|
if (!plot.trusted.contains(uuid)) {
|
||||||
|
MainUtil.sendMessage(plr, C.T_WAS_NOT_ADDED);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
plot.removeTrusted(uuid);
|
plot.removeTrusted(uuid);
|
||||||
DBFunc.removeTrusted(loc.getWorld(), plot, uuid);
|
DBFunc.removeTrusted(loc.getWorld(), plot, uuid);
|
||||||
EventUtil.manager.callTrusted(plr, plot, uuid, false);
|
EventUtil.manager.callTrusted(plr, plot, uuid, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user