Check admin for setowner null

This commit is contained in:
Jesse Boyd 2018-07-31 14:28:22 +10:00
parent 2c11a292f4
commit 3d8d75170d
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -42,6 +42,9 @@ public class Owner extends SetCommand {
}
if (uuid == null || value.equalsIgnoreCase("-")) {
if (value.equalsIgnoreCase("none") || value.equalsIgnoreCase("null") || value.equalsIgnoreCase("-")) {
if (!Permissions.hasPermission(player, C.PERMISSION_ADMIN_COMMAND_SETOWNER.s(), true)) {
return false;
}
Set<Plot> connected = plot.getConnectedPlots();
plot.unlinkPlot(false, false);
for (Plot current : connected) {