mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Separate hotbar from player inventory
this allows this functionality to be used with any type of inventory, and also makes it a little nicer to use in many cases.
This commit is contained in:
@ -145,7 +145,7 @@ class Armor extends Durable{
|
||||
$thisCopy = clone $this;
|
||||
$new = $thisCopy->pop();
|
||||
$player->getArmorInventory()->setItem($this->getArmorSlot(), $new);
|
||||
$player->getInventory()->setItemInHand($existing);
|
||||
$player->getHotbar()->setHeldItem($existing);
|
||||
$sound = $new->getMaterial()->getEquipSound();
|
||||
if($sound !== null){
|
||||
$player->broadcastSound($sound);
|
||||
|
Reference in New Issue
Block a user