diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 35263dd23..2d8814978 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -3549,6 +3549,9 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ $this->inventory->setHeldItemIndex(0, false); //This is already handled when sending contents, don't send it twice $this->inventory->clearAll(); } + if($this->armorInventory !== null){ + $this->armorInventory->clearAll(); + } } if($ev->getDeathMessage() != ""){ diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index 9111551b3..7c2a67688 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -613,7 +613,10 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{ } public function getDrops() : array{ - return $this->inventory !== null ? array_values($this->inventory->getContents()) : []; + return array_merge( + $this->inventory !== null ? array_values($this->inventory->getContents()) : [], + $this->armorInventory !== null ? array_values($this->armorInventory->getContents()) : [] + ); } public function saveNBT(){