From 5baa87e9febc7312406e8ca263af292136c01ad4 Mon Sep 17 00:00:00 2001 From: Sjoerd Date: Fri, 4 Sep 2015 23:40:19 +0200 Subject: [PATCH] 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. --- src/pocketmine/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 5ab3ba015..ae38135f3 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1769,7 +1769,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade if($this->isCreative()){ $this->inventory->setHeldItemSlot(0); }else{ - $this->inventory->setHeldItemSlot(0); + $this->inventory->setHeldItemSlot($this->inventory->getHotbarSlotIndex(0)); } $pk = new PlayStatusPacket();