How to remove item in hotbar (for example gold Id:266)? (By event) I tried to remove all inventory clearall(). But item in hotbar didnt remove. Item in hotbar can be dropped...
Im not sure if this helps, but the answer to your question may be here. http://docs.pocketmine.net/dc/d77/classpocketmine_1_1inventory_1_1_player_inventory.html ( Im just pointing out the docs, I checked it, so you may find what you are looking for )
I don't really understand your question but if you want to make sure there are no items in the hotbar then use PlayerInventory::setHotbarSlotIndex($index, $slot) and set it to an empty slot