// Sub of edit and del
if (args.length == 4 && args[1].equalsIgnoreCase("edit") && args[2].equalsIgnoreCase("del"))
{
try
{
Zone zone = APIRegistry.perms.getZoneAt(new WorldPoint((Entity) sender));
if (args[0].equalsIgnoreCase("world"))
{
zone = APIRegistry.perms.getWorldZone(((Entity) sender).worldObj);
}
if (args[0].equalsIgnoreCase("global"))
{
zone = APIRegistry.perms.getServerZone();
}
// TODO: Identify zones by unique names
// if (APIRegistry.perms.doesZoneExist(args[0]))
// {
// zone = APIRegistry.perms.getZone(args[0]);
// }
AutoPromote ap = AutoPromoteManager.instance().map.get(zone.toString());
if (ap == null)
{
AutoPromoteManager.instance().map.put(zone.getId(), new AutoPromote(zone.getId(), false));
ap = AutoPromoteManager.instance().map.get(zone.toString());
}
return getListOfStringsFromIterableMatchingLastWord(args, ap.getList());
}
catch (Exception e)
{
}
}
// Sub of edit and add
if (args.length == 5 && args[1].equalsIgnoreCase("edit") && args[2].equalsIgnoreCase("add"))
{
try
{
Zone zone = APIRegistry.perms.getZoneAt(new WorldPoint((Entity) sender));
if (args[0].equalsIgnoreCase("world"))
{
zone = APIRegistry.perms.getWorldZone(((Entity) sender).worldObj);
}
if (args[0].equalsIgnoreCase("global"))