diff --git a/src/main/java/net/citizensnpcs/trait/waypoint/GenericWaypointCallback.java b/src/main/java/net/citizensnpcs/trait/waypoint/GenericWaypointCallback.java index 44a9f0889..b27693054 100644 --- a/src/main/java/net/citizensnpcs/trait/waypoint/GenericWaypointCallback.java +++ b/src/main/java/net/citizensnpcs/trait/waypoint/GenericWaypointCallback.java @@ -75,6 +75,8 @@ public class GenericWaypointCallback extends NavigationCallback { public void onProviderChanged() { itr = provider.iterator(); + if (ai == null) + return; dest = itr.hasNext() ? itr.next().getLocation() : null; if (dest != null) { ai.setDestination(dest);