Properly handle transaction building errors instead of kicking the player

This commit is contained in:
Dylan K. Taylor
2023-03-20 00:52:26 +00:00
parent 4864444440
commit 7b0816e42f
5 changed files with 104 additions and 63 deletions

View File

@ -50,6 +50,10 @@ final class TransactionBuilderInventory extends BaseInventory{
$this->changedSlots = new \SplFixedArray($this->actualInventory->getSize());
}
public function getActualInventory() : Inventory{
return $this->actualInventory;
}
protected function internalSetContents(array $items) : void{
for($i = 0, $size = $this->getSize(); $i < $size; ++$i){
if(!isset($items[$i])){