Skip to content

Commit

Permalink
Fix for premature path finish bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MomoPewpew committed Jun 30, 2024
1 parent 9c156fb commit cb01576
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void onMove(PlayerMoveEvent event) {
PathPlayer<Player> pathPlayer = PathPlayer.wrap(p);

AbstractNavigationModule<Player>.NavigationContext info = activePaths.get(pathPlayer.getUniqueId());
if (info != null && pathPlayer.getLocation().distanceSquared(info.target().getLocation()) < Math.pow(info.dist(), info.dist())) {
if (info != null && pathPlayer.getLocation().distanceSquared(info.target().getLocation()) < Math.pow(info.dist(), 2)) {
reach(info.playerId());
}
}
Expand Down

0 comments on commit cb01576

Please sign in to comment.