diff --git a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java index 60fced7fb..04e118673 100644 --- a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java @@ -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"); diff --git a/src/main/java/net/citizensnpcs/trait/waypoint/LinearWaypointProvider.java b/src/main/java/net/citizensnpcs/trait/waypoint/LinearWaypointProvider.java index 3466f503f..fadd88cae 100644 --- a/src/main/java/net/citizensnpcs/trait/waypoint/LinearWaypointProvider.java +++ b/src/main/java/net/citizensnpcs/trait/waypoint/LinearWaypointProvider.java @@ -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() {