Update ContainerInventory on Transaction refused

This commit is contained in:
Shoghi Cervantes
2014-05-28 17:11:06 +02:00
parent f795a3f565
commit f66560ccd4
11 changed files with 94 additions and 44 deletions

View File

@ -50,12 +50,12 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
return $index < $this->left->getSize() ? $this->left->getItem($index) : $this->right->getItem($index - $this->right->getSize());
}
public function setItem($index, Item $item){
return $index < $this->left->getSize() ? $this->left->setItem($index, $item) : $this->right->setItem($index - $this->right->getSize(), $item);
public function setItem($index, Item $item, $source = null){
return $index < $this->left->getSize() ? $this->left->setItem($index, $item, $source) : $this->right->setItem($index - $this->right->getSize(), $item, $source);
}
public function clear($index){
return $index < $this->left->getSize() ? $this->left->clear($index) : $this->right->clear($index - $this->right->getSize());
public function clear($index, $source = null){
return $index < $this->left->getSize() ? $this->left->clear($index, $source) : $this->right->clear($index - $this->right->getSize(), $source);
}
public function getContents(){