@Override public void run(final NPC npc, Block point, ListIterator<Block> path) { current = path; if (added || npc.data().<Boolean> get("running-ladder", false)) { added = true; return; } Runnable callback = new Runnable() { Location dummy = new Location(null, 0, 0, 0); @Override public void run() { if (npc.getEntity().getLocation(dummy).getBlock().getType() == Material.LADDER && current.next().getY() > current.previous().getY()) { npc.getEntity().setVelocity(npc.getEntity().getVelocity().setY(0.3)); } } }; npc.getNavigator().getLocalParameters().addSingleUseCallback(new NavigatorCallback() { @Override public void onCompletion(CancelReason cancelReason) { npc.data().set("running-ladder", false); } }); npc.getNavigator().getLocalParameters().addRunCallback(callback); added = true; } }