Fix to '/npc anchor --save name -c'

This commit is contained in:
Jeremy Schroeder 2012-12-30 12:13:58 -05:00
parent 094d2a2084
commit 5b3a24411c
2 changed files with 2 additions and 2 deletions

View File

@ -207,7 +207,7 @@ public class CommandContext {
} }
public Location getSenderTargetBlockLocation() { public Location getSenderTargetBlockLocation() {
if (location != null || sender == null) if (sender == null)
return location; return location;
if (sender instanceof Player) if (sender instanceof Player)
location = ((Player) sender).getTargetBlock(null, 50).getLocation(); location = ((Player) sender).getTargetBlock(null, 50).getLocation();

View File

@ -131,7 +131,7 @@ public class NPCCommands {
flags = "ac", flags = "ac",
modifiers = { "anchor" }, modifiers = { "anchor" },
min = 1, min = 1,
max = 2, max = 3,
permission = "npc.anchor") permission = "npc.anchor")
@Requirements(selected = true, ownership = true, types = EntityType.PLAYER) @Requirements(selected = true, ownership = true, types = EntityType.PLAYER)
public void anchor(CommandContext args, CommandSender sender, NPC npc) throws CommandException { public void anchor(CommandContext args, CommandSender sender, NPC npc) throws CommandException {