mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-29 14:49:59 +00:00
Fixed slots on creative
This commit is contained in:
parent
923be2fffc
commit
211e1ae121
@ -1743,8 +1743,8 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
break;
|
break;
|
||||||
}elseif($this->isCreative()){
|
}elseif($this->isCreative()){
|
||||||
$this->inventory->setHeldItemIndex($packet->selectedSlot);
|
$this->inventory->setHeldItemIndex($packet->selectedSlot);
|
||||||
$this->inventory->setItem($slot, $item);
|
$this->inventory->setItem($packet->selectedSlot, $item);
|
||||||
$this->inventory->setHeldItemSlot($slot);
|
$this->inventory->setHeldItemSlot($packet->selectedSlot);
|
||||||
}else{
|
}else{
|
||||||
if($packet->selectedSlot >= 0 and $packet->selectedSlot < $this->inventory->getHotbarSize()){
|
if($packet->selectedSlot >= 0 and $packet->selectedSlot < $this->inventory->getHotbarSize()){
|
||||||
$this->inventory->setHeldItemIndex($packet->selectedSlot);
|
$this->inventory->setHeldItemIndex($packet->selectedSlot);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user