Package com.forgeessentials.api.permissions

Examples of com.forgeessentials.api.permissions.Zone


    // 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"))
View Full Code Here

TOP

Related Classes of com.forgeessentials.api.permissions.Zone

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.