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;