Package net.aufdemrand.denizen.events.bukkit

Examples of net.aufdemrand.denizen.events.bukkit.ExhaustedNPCEvent


    public void onMove(NavigationBeginEvent event) {

        if (allowexhaustion) {
            if (isStarving()) {
                // Create NPCExhaustedEvent, give chance for outside plugins to cancel.
                ExhaustedNPCEvent e = new ExhaustedNPCEvent(npc);
                Bukkit.getServer().getPluginManager().callEvent(e);

                // If still exhausted, cancel navigation and fire 'On Exhausted:' action
                if (!e.isCancelled()) {
                    npc.getNavigator().cancelNavigation();
                    DenizenAPI.getDenizenNPC(npc).action("exhausted", null);

                    // No need to progress any further.
                    return;
View Full Code Here

TOP

Related Classes of net.aufdemrand.denizen.events.bukkit.ExhaustedNPCEvent

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.