mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +00:00
Do not save empty inventory slots
This commit is contained in:
parent
c9cf3d5aa4
commit
34f833fa79
@ -443,8 +443,10 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
$slotCount = $this->inventory->getSize() + $this->inventory->getHotbarSize();
|
||||
for($slot = $this->inventory->getHotbarSize(); $slot < $slotCount; ++$slot){
|
||||
$item = $this->inventory->getItem($slot - 9);
|
||||
if($item->getId() !== ItemItem::AIR){
|
||||
$this->namedtag->Inventory[$slot] = $item->nbtSerialize($slot);
|
||||
}
|
||||
}
|
||||
|
||||
//Armor
|
||||
for($slot = 100; $slot < 104; ++$slot){
|
||||
|
Loading…
x
Reference in New Issue
Block a user