mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 02:38:54 +00:00
DoubleChestInventory: fixed use of void result
This commit is contained in:
parent
d23dbc69f1
commit
685f5d562b
@ -85,15 +85,11 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
|
|||||||
$items = array_slice($items, 0, $size, true);
|
$items = array_slice($items, 0, $size, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$leftSize = $this->left->getSize();
|
|
||||||
|
|
||||||
for($i = 0; $i < $size; ++$i){
|
for($i = 0; $i < $size; ++$i){
|
||||||
if(!isset($items[$i])){
|
if(!isset($items[$i])){
|
||||||
if(($i < $leftSize and isset($this->left->slots[$i])) or isset($this->right->slots[$i - $leftSize])){
|
|
||||||
$this->clear($i, false);
|
|
||||||
}
|
|
||||||
}elseif(!$this->setItem($i, $items[$i], false)){
|
|
||||||
$this->clear($i, false);
|
$this->clear($i, false);
|
||||||
|
}else{
|
||||||
|
$this->setItem($i, $items[$i], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user