mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 05:55:33 +00:00
Don't add actions to the transaction if a crash occurred when getting the source inventory
This commit is contained in:
parent
5d436a06ec
commit
83fcec3e94
@ -86,11 +86,12 @@ class SimpleInventoryTransaction implements InventoryTransaction{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->actions[spl_object_hash($action)] = $action;
|
||||
if($action instanceof SlotChangeAction){
|
||||
$action->setInventoryFrom($this->source);
|
||||
$this->inventories[spl_object_hash($action->getInventory())] = $action->getInventory();
|
||||
}
|
||||
|
||||
$this->actions[spl_object_hash($action)] = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user