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