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;
}elseif($this->isCreative()){
$this->inventory->setHeldItemIndex($packet->selectedSlot);
$this->inventory->setItem($slot, $item);
$this->inventory->setHeldItemSlot($slot);
$this->inventory->setItem($packet->selectedSlot, $item);
$this->inventory->setHeldItemSlot($packet->selectedSlot);
}else{
if($packet->selectedSlot >= 0 and $packet->selectedSlot < $this->inventory->getHotbarSize()){
$this->inventory->setHeldItemIndex($packet->selectedSlot);