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

@ -448,6 +448,7 @@ class InGamePacketHandler extends PacketHandler{
}
public function handleMobEquipment(MobEquipmentPacket $packet) : bool{
$this->session->getInvManager()->onClientSelectHotbarSlot($packet->hotbarSlot);
if(!$this->player->selectHotbarSlot($packet->hotbarSlot)){
$this->session->getInvManager()->syncSelectedHotbarSlot();
}