Package net.citizensnpcs.resources.npclib

Examples of net.citizensnpcs.resources.npclib.HumanNPC.teleport()


            if (isSoldier(npc)) {
                if (holding) {
                    select(event.getPlayer(), npc, getSelection(event.getPlayer()));
                } else if (UtilityProperties.isHoldingTool("SoldierReturnTool", event.getPlayer())) {
                    npc.getHandle().cancelTarget();
                    npc.teleport(npc.getBaseLocation());
                }
                return;
            }
        }
View Full Code Here


        int newUID = NPCManager.register(npc.getName(), player.getLocation(), player.getName(),
                NPCCreateReason.COMMAND);
        HumanNPC newNPC = NPCManager.get(newUID);
        PropertyManager.copyNPCs(npc.getUID(), newUID);
        PropertyManager.load(newNPC);
        newNPC.teleport(player.getLocation());
        newNPC.getNPCData().setLocation(player.getLocation());
        player.sendMessage(StringUtils.wrap(npc.getName()) + " has been copied at your location.");
    }

    @CommandRequirements()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.