Fixed slots on creative

This commit is contained in:
Shoghi Cervantes 2015-04-30 17:51:04 +02:00
parent 923be2fffc
commit 211e1ae121

View File

@ -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);