InGamePacketHandler: mark player as not using item in more cases

fixes #4355
This commit is contained in:
Dylan K. Taylor 2021-10-31 14:41:31 +00:00
parent 4fe3f69702
commit c580bb2434
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -297,6 +297,7 @@ class InGamePacketHandler extends PacketHandler{
//all of the parts before we can execute it //all of the parts before we can execute it
return true; return true;
} }
$this->player->setUsingItem(false);
try{ try{
$this->inventoryManager->onTransactionStart($this->craftingTransaction); $this->inventoryManager->onTransactionStart($this->craftingTransaction);
$this->craftingTransaction->execute(); $this->craftingTransaction->execute();
@ -332,6 +333,7 @@ class InGamePacketHandler extends PacketHandler{
return true; return true;
} }
$this->player->setUsingItem(false);
$transaction = new InventoryTransaction($this->player, $actions); $transaction = new InventoryTransaction($this->player, $actions);
$this->inventoryManager->onTransactionStart($transaction); $this->inventoryManager->onTransactionStart($transaction);
try{ try{