Inventory: Added includeEmpty parameter to getContents()

This commit is contained in:
Dylan K. Taylor
2018-01-22 21:08:40 +00:00
parent 2fb580db26
commit 1de7c5b114
3 changed files with 15 additions and 12 deletions

View File

@ -71,15 +71,6 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
return $index < $this->left->getSize() ? $this->left->clear($index, $send) : $this->right->clear($index - $this->right->getSize(), $send);
}
public function getContents() : array{
$contents = [];
for($i = 0, $size = $this->getSize(); $i < $size; ++$i){
$contents[$i] = $this->getItem($i);
}
return $contents;
}
/**
* @param Item[] $items
* @param bool $send