Package net.citizensnpcs.api.event

Examples of net.citizensnpcs.api.event.NPCTalkEvent


                }
            }
            // Call NPC talk event
            if (npc.getNPCData().isTalk() && UtilityProperties.isHoldingTool("TalkItems", player)) {
                Player target = (Player) e.getTarget();
                NPCTalkEvent talkEvent = new NPCTalkEvent(npc, target, MessageUtils.getText(npc, target));
                Bukkit.getServer().getPluginManager().callEvent(talkEvent);
                if (!talkEvent.isCancelled()) {
                    if (!talkEvent.getText().isEmpty()) {
                        Messaging.send(target, npc, talkEvent.getText());
                    }
                }
            }
            NPCRightClickEvent rightClickEvent = new NPCRightClickEvent(npc, player);
            Bukkit.getServer().getPluginManager().callEvent(rightClickEvent);
View Full Code Here

TOP

Related Classes of net.citizensnpcs.api.event.NPCTalkEvent

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.