mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-01 05:57:09 +00:00
Resolves FS-340 and improves some surrounding code a bit
This commit is contained in:
parent
20f341ea45
commit
2b5ea048cc
@ -217,26 +217,23 @@ public class Command_myadmin extends FreedomCommand
|
|||||||
}
|
}
|
||||||
else if (args.length == 2)
|
else if (args.length == 2)
|
||||||
{
|
{
|
||||||
if (args[0].equals("-o"))
|
if (args[0].equalsIgnoreCase("-o"))
|
||||||
{
|
{
|
||||||
return FUtil.getPlayerList();
|
return FUtil.getPlayerList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (doubleArguments.contains(args[0]))
|
if (doubleArguments.contains(args[0]) && args[0].equalsIgnoreCase("clearip"))
|
||||||
{
|
{
|
||||||
if (args[0].equals("clearip"))
|
List<String> ips = plugin.al.getAdmin(sender).getIps();
|
||||||
{
|
ips.remove(FUtil.getIp((Player)sender));
|
||||||
List<String> ips = plugin.al.getAdmin(sender).getIps();
|
return ips;
|
||||||
ips.remove(FUtil.getIp((Player)sender));
|
|
||||||
return ips;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (args.length == 3)
|
else if (args.length == 3)
|
||||||
{
|
{
|
||||||
if (args[0].equals("-o"))
|
if (args[0].equalsIgnoreCase("-o"))
|
||||||
{
|
{
|
||||||
List<String> options = new ArrayList<>();
|
List<String> options = new ArrayList<>();
|
||||||
options.addAll(singleArguments);
|
options.addAll(singleArguments);
|
||||||
@ -246,7 +243,7 @@ public class Command_myadmin extends FreedomCommand
|
|||||||
}
|
}
|
||||||
else if (args.length == 4)
|
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]);
|
Admin admin = plugin.al.getEntryByName(args[1]);
|
||||||
if (admin != null)
|
if (admin != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user