mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 05:55:33 +00:00
Merge pull request #1793 from Intyre/bug/inventory
player creative inventory bugfix
This commit is contained in:
commit
14817df2c7
@ -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;
|
||||||
@ -2395,4 +2395,4 @@ if(is_numeric($data["cause"])){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Player::broadcastMessage($data["player"]->getName() . $message);
|
Player::broadcastMessage($data["player"]->getName() . $message);
|
||||||
*/
|
*/
|
Loading…
x
Reference in New Issue
Block a user