From 3ba213f2f06c807cf7789f8038e41ec52dd4d018 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 20 Aug 2013 12:52:06 +0200 Subject: [PATCH] Proper same armor check --- src/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Player.php b/src/Player.php index 654c0893a..30e3efa53 100644 --- a/src/Player.php +++ b/src/Player.php @@ -1442,7 +1442,7 @@ class Player{ }elseif($s->getID() !== AIR and $slot->getID() === AIR and ($sl = $this->hasItem($s->getID())) !== false){ $this->armor[$i] = $this->getSlot($sl); $this->setSlot($sl, BlockAPI::getItem(AIR, 0, 0), false); - }elseif($s->getID() !== AIR and $slot->getID() !== AIR and ($sl = $this->hasItem($s->getID())) !== false){ + }elseif($s->getID() !== AIR and $slot->getID() !== AIR and ($slot->getID() !== $s->getID() or $slot->getMetadata() !== $s->getMetadata()) and ($sl = $this->hasItem($s->getID())) !== false){ $item = $this->armor[$i]; $this->armor[$i] = $this->getSlot($sl); $this->setSlot($sl, $item, false);