Test fix for pathing

This commit is contained in:
fullwall 2012-09-10 22:40:25 +08:00
parent d08c1dc623
commit 5b9cf50b8e
2 changed files with 4 additions and 5 deletions

View File

@ -632,11 +632,11 @@ public class NPCCommands {
flags = "t",
permission = "npc.vulnerable")
public void vulnerable(CommandContext args, CommandSender sender, NPC npc) {
boolean vulnerable = !npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean vulnerable = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
if (args.hasFlag('t'))
npc.data().set(NPC.DEFAULT_PROTECTED_METADATA, vulnerable);
npc.data().set(NPC.DEFAULT_PROTECTED_METADATA, !vulnerable);
else
npc.data().setPersistent(NPC.DEFAULT_PROTECTED_METADATA, vulnerable);
npc.data().setPersistent(NPC.DEFAULT_PROTECTED_METADATA, !vulnerable);
Messaging.sendF(sender, ChatColor.GREEN + "%s is %s vulnerable.", StringHelper.wrap(npc.getName()),
vulnerable ? "now" : "no longer");

View File

@ -222,8 +222,7 @@ public class LinearWaypointProvider implements WaypointProvider {
public void onNavigationComplete(NavigationCompleteEvent event) {
if (currentDestination == null || !event.getNavigator().equals(getNavigator()))
return;
if (currentDestination.equals(event.getNavigator().getTargetAsLocation()))
selector.finish();
selector.finish();
}
public void onProviderChanged() {