diff --git a/src/main/java/net/aufdemrand/denizen/objects/dEntity.java b/src/main/java/net/aufdemrand/denizen/objects/dEntity.java index 0caf5f726e..f3cc18bfec 100644 --- a/src/main/java/net/aufdemrand/denizen/objects/dEntity.java +++ b/src/main/java/net/aufdemrand/denizen/objects/dEntity.java @@ -41,6 +41,7 @@ import org.bukkit.util.Vector; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.UUID; import java.util.regex.Matcher; @@ -1537,7 +1538,8 @@ else if (mtr.angle == BlockFace.EAST) { if (attribute.startsWith("location.cursor_on")) { int range = attribute.getIntContext(2); if (range < 1) range = 50; - return new dLocation(getLivingEntity().getTargetBlock(null, range).getLocation().clone()) + HashSet set = new HashSet(); + return new dLocation(getLivingEntity().getTargetBlock(set, range).getLocation().clone()) .getAttribute(attribute.fulfill(2)); } diff --git a/src/main/java/net/aufdemrand/denizen/utilities/command/CommandContext.java b/src/main/java/net/aufdemrand/denizen/utilities/command/CommandContext.java index b981f8aa67..a68e41cdc5 100644 --- a/src/main/java/net/aufdemrand/denizen/utilities/command/CommandContext.java +++ b/src/main/java/net/aufdemrand/denizen/utilities/command/CommandContext.java @@ -196,16 +196,6 @@ else if (sender instanceof BlockCommandSender) return location; } - public Location getSenderTargetBlockLocation() { - if (sender == null) - return location; - if (sender instanceof Player) - location = ((Player) sender).getTargetBlock(null, 50).getLocation(); - else if (sender instanceof BlockCommandSender) - location = ((BlockCommandSender) sender).getBlock().getLocation(); - return location; - } - public String[] getSlice(int index) { String[] slice = new String[args.length - index]; System.arraycopy(args, index, slice, 0, args.length - index);