mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-27 03:28:45 +01:00
Merge pull request #83 from mcmonkey4eva/master
Fix NavigationStuckEvent set-null
This commit is contained in:
commit
3e2fd8516c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user