Separate held item index change listener logic from PlayerInventory

This commit is contained in:
Dylan K. Taylor
2021-01-12 16:44:25 +00:00
parent 01c867b608
commit c70c0b55df
5 changed files with 48 additions and 17 deletions

View File

@ -1373,7 +1373,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
return false;
}
$this->inventory->setHeldItemIndex($hotbarSlot, false);
$this->inventory->setHeldItemIndex($hotbarSlot);
$this->setUsingItem(false);
return true;