mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-01 14:08:08 +01:00
Fix to '/npc anchor --save name -c'
This commit is contained in:
parent
094d2a2084
commit
5b3a24411c
@ -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();
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user