mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
player creative inventory bugfix
This commit is contained in:
parent
aded24e6c6
commit
cc87064915
@ -1360,7 +1360,6 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
Block::$creative[$packet->slot][1],
|
Block::$creative[$packet->slot][1],
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
$this->inventory->setHeldItemSlot(0);
|
|
||||||
$this->inventory->setItemInHand($item);
|
$this->inventory->setItemInHand($item);
|
||||||
}else{
|
}else{
|
||||||
$this->inventory->setHeldItemSlot($packet->slot);
|
$this->inventory->setHeldItemSlot($packet->slot);
|
||||||
@ -1891,6 +1890,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
if($packet->slot > $this->inventory->getSize()){
|
if($packet->slot > $this->inventory->getSize()){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
$this->inventory->setHeldItemSlot($packet->slot);
|
||||||
$transaction = new BaseTransaction($this->inventory, $packet->slot, $this->inventory->getItem($packet->slot), $packet->item);
|
$transaction = new BaseTransaction($this->inventory, $packet->slot, $this->inventory->getItem($packet->slot), $packet->item);
|
||||||
}elseif(isset($this->windowIndex[$packet->windowid])){
|
}elseif(isset($this->windowIndex[$packet->windowid])){
|
||||||
$this->craftingType = 0;
|
$this->craftingType = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user