From 9d8c17c376c17096218b72937618687cc2347078 Mon Sep 17 00:00:00 2001 From: Jeremy Schroeder Date: Sun, 30 Dec 2012 12:13:58 -0500 Subject: [PATCH] Fix to '/npc anchor --save name -c' --- src/main/java/net/citizensnpcs/command/CommandContext.java | 2 +- src/main/java/net/citizensnpcs/command/command/NPCCommands.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/citizensnpcs/command/CommandContext.java b/src/main/java/net/citizensnpcs/command/CommandContext.java index 1f906602b..4b7a46391 100644 --- a/src/main/java/net/citizensnpcs/command/CommandContext.java +++ b/src/main/java/net/citizensnpcs/command/CommandContext.java @@ -207,7 +207,7 @@ public class CommandContext { } public Location getSenderTargetBlockLocation() { - if (location != null || sender == null) + if (sender == null) return location; if (sender instanceof Player) location = ((Player) sender).getTargetBlock(null, 50).getLocation(); diff --git a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java index 9230d6eca..1bde6730f 100644 --- a/src/main/java/net/citizensnpcs/command/command/NPCCommands.java +++ b/src/main/java/net/citizensnpcs/command/command/NPCCommands.java @@ -131,7 +131,7 @@ public class NPCCommands { flags = "ac", modifiers = { "anchor" }, min = 1, - max = 2, + max = 3, permission = "npc.anchor") @Requirements(selected = true, ownership = true, types = EntityType.PLAYER) public void anchor(CommandContext args, CommandSender sender, NPC npc) throws CommandException {