First item in the hotbar is not loaded correctly

When you logon the first hotbar item contains the first item of the inventory, but it should contain the previously selected item.
This commit is contained in:
Sjoerd 2015-09-04 23:40:19 +02:00
parent 91bda131be
commit 5baa87e9fe

View File

@ -1769,7 +1769,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
if($this->isCreative()){ if($this->isCreative()){
$this->inventory->setHeldItemSlot(0); $this->inventory->setHeldItemSlot(0);
}else{ }else{
$this->inventory->setHeldItemSlot(0); $this->inventory->setHeldItemSlot($this->inventory->getHotbarSlotIndex(0));
} }
$pk = new PlayStatusPacket(); $pk = new PlayStatusPacket();