mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Inventory: Fix hotbar spaz
This commit is contained in:
@ -68,11 +68,11 @@ class PlayerInventory extends BaseInventory{
|
||||
return $this->itemInHandIndex;
|
||||
}
|
||||
|
||||
public function setHeldItemIndex($index){
|
||||
public function setHeldItemIndex($index, $send = true){
|
||||
if($index >= 0 and $index < $this->getHotbarSize()){
|
||||
$this->itemInHandIndex = $index;
|
||||
|
||||
if($this->getHolder() instanceof Player){
|
||||
if($this->getHolder() instanceof Player and $send){
|
||||
$this->sendHeldItem($this->getHolder());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user