diff --git a/src/main/java/org/maxgamer/quickshop/Shop/ArmorStandDisplayItem.java b/src/main/java/org/maxgamer/quickshop/Shop/ArmorStandDisplayItem.java index 5302fd82d..967c0bfd6 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/ArmorStandDisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/ArmorStandDisplayItem.java @@ -193,12 +193,12 @@ public class ArmorStandDisplayItem implements DisplayItem { } boolean removed = false; Chunk chunk = shop.getLocation().getChunk(); - for (Entity entity : chunk.getEntities()) { + for (Entity entity : armorStand.getNearbyEntities(1, 1, 1)) { if (!(entity instanceof ArmorStand)) { continue; } ArmorStand eArmorStand = (ArmorStand) entity; - if (eArmorStand.getItemInHand().equals(this.guardedIstack)) { + if (plugin.getItemMatcher().matches(eArmorStand.getItemInHand(),this.guardedIstack)) { if (!eArmorStand.getUniqueId().equals(this.armorStand.getUniqueId())) { Util.debugLog("Removing dupes ArmorEntity " + eArmorStand.getUniqueId().toString() + " at " + eArmorStand .getLocation().toString()); diff --git a/src/main/java/org/maxgamer/quickshop/Shop/RealDisplayItem.java b/src/main/java/org/maxgamer/quickshop/Shop/RealDisplayItem.java index a8d1ef11d..9e465b907 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/RealDisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/RealDisplayItem.java @@ -98,7 +98,7 @@ public class RealDisplayItem implements DisplayItem { } boolean removed = false; Chunk chunk = shop.getLocation().getChunk(); - for (Entity entity : chunk.getEntities()) { + for (Entity entity : item.getNearbyEntities(1, 1, 1)) { if (!(entity instanceof Item)) continue; Item eItem = (Item) entity;