mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
This commit is contained in:
commit
ca54c8d78e
@ -82,7 +82,7 @@ class InventoryTransaction{
|
||||
*/
|
||||
public function addAction(InventoryAction $action) : void{
|
||||
if(!isset($this->actions[$hash = spl_object_hash($action)])){
|
||||
$this->actions[spl_object_hash($action)] = $action;
|
||||
$this->actions[$hash] = $action;
|
||||
$action->onAddToTransaction($this);
|
||||
}else{
|
||||
throw new \InvalidArgumentException("Tried to add the same action to a transaction twice");
|
||||
|
Loading…
x
Reference in New Issue
Block a user