diff --git a/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java b/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java index ed023047d..dd9e37542 100644 --- a/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java +++ b/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java @@ -225,12 +225,12 @@ public class CitizensNavigator implements Navigator, Runnable { stopNavigating(); return; } - if (reason == CancelReason.STUCK && localParams.stuckAction() != null) { + if (reason == CancelReason.STUCK) { StuckAction action = localParams.stuckAction(); NavigationStuckEvent event = new NavigationStuckEvent(this, action); Bukkit.getPluginManager().callEvent(event); action = event.getAction(); - boolean shouldContinue = action.run(npc, this); + boolean shouldContinue = action != null ? action.run(npc, this): false; if (shouldContinue) { stationaryTicks = 0; executing.clearCancelReason();