Examples of NPCRightClickEvent


Examples of net.citizensnpcs.api.event.NPCRightClickEvent

    @Override
    public boolean update(Event event, ObjectiveProgress progress) {
        if (!(event instanceof NPCRightClickEvent))
            return false;
        NPCRightClickEvent e = (NPCRightClickEvent) event;
        if (e.getPlayer().getEntityId() != progress.getPlayer().getEntityId()
                || e.getNPC().getUID() != progress.getObjective().getDestNPCID())
            return false;
        Player player = progress.getPlayer();

        if (progress.getObjective().getMaterial() == null || progress.getObjective().getMaterial() == Material.AIR) {
            return true;
View Full Code Here

Examples of net.citizensnpcs.api.event.NPCRightClickEvent

                    if (!talkEvent.getText().isEmpty()) {
                        Messaging.send(target, npc, talkEvent.getText());
                    }
                }
            }
            NPCRightClickEvent rightClickEvent = new NPCRightClickEvent(npc, player);
            Bukkit.getServer().getPluginManager().callEvent(rightClickEvent);
            if (!rightClickEvent.isCancelled()) {
                NPCDataManager.handleEquipmentEditor(rightClickEvent);
                NPCDataManager.handlePathRestart(rightClickEvent);
                if (npc.getWaypoints().isStarted() && npc.getWaypoints().current() != null) {
                    npc.getWaypoints().scheduleDelay(npc, npc.getWaypoints().current().getLocation(),
                            Settings.getInt("RightClickPause"));
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.