mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Fixed armor not dropping (#1962)
This commit is contained in:
parent
4a4900e5e7
commit
6c71b443e8
@ -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() != ""){
|
||||
|
@ -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(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user