mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Properly handle transaction building errors instead of kicking the player
This commit is contained in:
@ -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])){
|
||||
|
Reference in New Issue
Block a user