From 2b5ea048cc7c00ac2c5a205862b868cc23d84615 Mon Sep 17 00:00:00 2001 From: Video Date: Sun, 13 Nov 2022 06:44:56 -0700 Subject: [PATCH] Resolves FS-340 and improves some surrounding code a bit --- .../command/Command_myadmin.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myadmin.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myadmin.java index 1c38639c..095d4410 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myadmin.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_myadmin.java @@ -217,26 +217,23 @@ public class Command_myadmin extends FreedomCommand } else if (args.length == 2) { - if (args[0].equals("-o")) + if (args[0].equalsIgnoreCase("-o")) { return FUtil.getPlayerList(); } else { - if (doubleArguments.contains(args[0])) + if (doubleArguments.contains(args[0]) && args[0].equalsIgnoreCase("clearip")) { - if (args[0].equals("clearip")) - { - List ips = plugin.al.getAdmin(sender).getIps(); - ips.remove(FUtil.getIp((Player)sender)); - return ips; - } + List ips = plugin.al.getAdmin(sender).getIps(); + ips.remove(FUtil.getIp((Player)sender)); + return ips; } } } else if (args.length == 3) { - if (args[0].equals("-o")) + if (args[0].equalsIgnoreCase("-o")) { List options = new ArrayList<>(); options.addAll(singleArguments); @@ -246,7 +243,7 @@ public class Command_myadmin extends FreedomCommand } else if (args.length == 4) { - if (args[0].equals("-o") && args[2].equals("clearip")) + if (args[0].equalsIgnoreCase("-o") && args[2].equalsIgnoreCase("clearip")) { Admin admin = plugin.al.getEntryByName(args[1]); if (admin != null)