Package com.forgeessentials.teleport.util

Examples of com.forgeessentials.teleport.util.PWarp


    {
      if (args[0].equalsIgnoreCase("goto"))
      {
        if (map.containsKey(args[1]))
        {
          PWarp warp = map.get(args[1]);
          PlayerInfo playerInfo = PlayerInfo.getPlayerInfo(sender.getPersistentID());
          playerInfo.setLastTeleportOrigin(new WarpPoint(sender));
          CommandBack.justDied.remove(sender.getPersistentID());
          TeleportCenter.teleport(warp.getPoint(), (EntityPlayerMP) sender);
        }
        else
        {
          OutputHandler.chatError(sender, "That personal warp doesn't exist!");
        }
      }
      else if (args[0].equalsIgnoreCase("add"))
      {
        if (args.length == 1)
                {
                    OutputHandler.chatError(sender, "You must specify a warp name!");
                    return;
                }

                if (!map.containsKey(args[1]))
        {
          Integer prop = APIRegistry.perms.getUserPermissionPropertyInt(new UserIdent(sender), PERM_LIMIT_PROP);
          if (prop == null || prop == -1)
          {
            map.put(args[1], new PWarp(sender.getPersistentID().toString(), args[1], new WarpPoint(sender)));
            OutputHandler.chatConfirmation(sender, "Personal warp sucessfully added.");
          }
          else if (map.size() < prop)
          {
            map.put(args[1], new PWarp(sender.getPersistentID().toString(), args[1], new WarpPoint(sender)));
            OutputHandler.chatConfirmation(sender, "Personal warp sucessfully added.");
          }
          else
          {
            OutputHandler.chatError(sender, "You have reached your limit.");
View Full Code Here

TOP

Related Classes of com.forgeessentials.teleport.util.PWarp

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.