Merge branch 'master' into mcpe-1.1

This commit is contained in:
Dylan K. Taylor
2017-05-30 16:09:46 +01:00
9 changed files with 389 additions and 425 deletions

View File

@ -425,14 +425,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
}
public function getDrops(){
$drops = [];
if($this->inventory !== null){
foreach($this->inventory->getContents() as $item){
$drops[] = $item;
}
}
return $drops;
return $this->inventory !== null ? array_values($this->inventory->getContents()) : [];
}
public function saveNBT(){