mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Removed InventoryType, added new inventory API methods
This commit is contained in:
@ -39,7 +39,15 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
|
||||
$this->left = $left->getRealInventory();
|
||||
$this->right = $right->getRealInventory();
|
||||
$items = array_merge($this->left->getContents(), $this->right->getContents());
|
||||
BaseInventory::__construct($this, InventoryType::get(InventoryType::DOUBLE_CHEST), $items);
|
||||
BaseInventory::__construct($this, $items);
|
||||
}
|
||||
|
||||
public function getName() : string{
|
||||
return "Double Chest";
|
||||
}
|
||||
|
||||
public function getDefaultSize() : int{
|
||||
return $this->left->getDefaultSize() + $this->right->getDefaultSize();
|
||||
}
|
||||
|
||||
public function getInventory(){
|
||||
|
Reference in New Issue
Block a user