Fix:removeDupe make display item wrong

Former-commit-id: 205cf9c75455dcfde75658059453061326eb0c43 [formerly 7d187d4fb1b1bde1226713b55f0cdff0c08f701c]
Former-commit-id: 4869db92bf069d55a72e321f1ae680473e774f54
This commit is contained in:
Vlele committed 2019-06-07 18:19:53 +08:00
1 parent bd4628c13d
commit 9df3ba7115
2 files changed
+3 -3

No files matched your search

@@ -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());
@@ -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;