Skip to content

Commit

Permalink
patch NPE in followTrait#toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Mar 9, 2019
1 parent 7c348bf commit 2d0370a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main/src/main/java/net/citizensnpcs/trait/FollowTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public boolean toggle(OfflinePlayer player, boolean protect) {
}
this.followingUUID = player.getUniqueId();
if (npc.getNavigator().isNavigating() && this.player != null
&& npc.getNavigator().getEntityTarget() != null
&& this.player == npc.getNavigator().getEntityTarget().getTarget()) {
npc.getNavigator().cancelNavigation();
}
Expand Down

0 comments on commit 2d0370a

Please sign in to comment.