Fix guided waypoint provider

This commit is contained in:
fullwall 2023-12-11 23:39:34 +08:00
parent 06b0e2d800
commit ccf4f6b085
1 changed files with 2 additions and 2 deletions

View File

@ -89,10 +89,10 @@ public class GuidedWaypointProvider implements EnumerableWaypointProvider {
@Override @Override
public void begin() { public void begin() {
Messaging.sendTr(player, Messages.GUIDED_WAYPOINT_EDITOR_BEGIN);
if (showPath) { if (showPath) {
createWaypointMarkers(); createWaypointMarkers();
} }
Messaging.sendTr(player, Messages.GUIDED_WAYPOINT_EDITOR_BEGIN);
} }
private void createDestinationMarker(Waypoint element) { private void createDestinationMarker(Waypoint element) {
@ -365,7 +365,7 @@ public class GuidedWaypointProvider implements EnumerableWaypointProvider {
return false; return false;
target = destinations.get(Util.getFastRandom().nextInt(destinations.size())); target = destinations.get(Util.getFastRandom().nextInt(destinations.size()));
if (target.getLocation().getWorld().equals(npc.getEntity().getWorld())) { if (!target.getLocation().getWorld().equals(npc.getEntity().getWorld())) {
target = null; target = null;
return false; return false;
} }