mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-24 17:11:31 +01:00
Test fix for pathing
This commit is contained in:
parent
2c8ed97c42
commit
88a46277ca
@ -632,11 +632,11 @@ public class NPCCommands {
|
|||||||
flags = "t",
|
flags = "t",
|
||||||
permission = "npc.vulnerable")
|
permission = "npc.vulnerable")
|
||||||
public void vulnerable(CommandContext args, CommandSender sender, NPC npc) {
|
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'))
|
if (args.hasFlag('t'))
|
||||||
npc.data().set(NPC.DEFAULT_PROTECTED_METADATA, vulnerable);
|
npc.data().set(NPC.DEFAULT_PROTECTED_METADATA, !vulnerable);
|
||||||
else
|
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()),
|
Messaging.sendF(sender, ChatColor.GREEN + "%s is %s vulnerable.", StringHelper.wrap(npc.getName()),
|
||||||
vulnerable ? "now" : "no longer");
|
vulnerable ? "now" : "no longer");
|
||||||
|
@ -222,8 +222,7 @@ public class LinearWaypointProvider implements WaypointProvider {
|
|||||||
public void onNavigationComplete(NavigationCompleteEvent event) {
|
public void onNavigationComplete(NavigationCompleteEvent event) {
|
||||||
if (currentDestination == null || !event.getNavigator().equals(getNavigator()))
|
if (currentDestination == null || !event.getNavigator().equals(getNavigator()))
|
||||||
return;
|
return;
|
||||||
if (currentDestination.equals(event.getNavigator().getTargetAsLocation()))
|
selector.finish();
|
||||||
selector.finish();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onProviderChanged() {
|
public void onProviderChanged() {
|
||||||
|
Loading…
Reference in New Issue
Block a user