Package com.forgeessentials.teleport.util

Examples of com.forgeessentials.teleport.util.Warp


        {
            if (TeleportDataManager.warps.containsKey(args[0].toLowerCase()))
            {
                if (PermissionsManager.checkPermission(sender, getPermissionNode() + "." + args[0].toLowerCase()))
                {
                    Warp warp = TeleportDataManager.warps.get(args[0].toLowerCase());
                    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,
                            "You have insufficient permissions to do that. If you believe you received this message in error, please talk to a server admin.");
                }
            }
            else
            {
                OutputHandler.chatError(sender, "That warp doesn't exist!");
            }
        }
        else if (args.length == 2)
        {
            if (PermissionsManager.checkPermission(sender, TeleportModule.PERM_WARP_ADMIN))
            {
                if (args[0].equalsIgnoreCase("set"))
                {
                    if (TeleportDataManager.warps.containsKey(args[1].toLowerCase()))
                    {
                        OutputHandler.chatError(sender, "That warp already exists. Use '/warp del <name>' to delete.");
                    }
                    else
                    {
                        Warp warp = new Warp(args[1].toLowerCase(), new WarpPoint(sender.dimension, sender.posX, sender.posY, sender.posZ, sender.rotationPitch, sender.rotationYaw));
                        TeleportDataManager.addWarp(warp);
                        if (!TeleportDataManager.warps.containsKey(args[1].toLowerCase()))
                            {
                                OutputHandler.chatError(sender, "Could not make warp! This is an error!");
                            }
View Full Code Here


            if (TeleportDataManager.warps.containsKey(args[1].toLowerCase()))
            {
                EntityPlayerMP player = UserIdent.getPlayerByMatchOrUsername(sender, args[0]);
                if (player != null)
                {
                    Warp warp = TeleportDataManager.warps.get(args[1].toLowerCase());
                    PlayerInfo.getPlayerInfo(player.getPersistentID()).setLastTeleportOrigin(new WarpPoint(player));
                    TeleportCenter.teleport(warp.getPoint(), player);
                }
                else
                {
                    OutputHandler.chatError(sender, String.format("Player %s does not exist, or is not online.", args[0]));
                }
View Full Code Here

TOP

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

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.