mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Send creative inventory for all gamemodes, fixed recipe book
This commit is contained in:
@ -509,7 +509,8 @@ class PlayerInventory extends BaseInventory{
|
||||
public function sendCreativeContents(){
|
||||
$pk = new InventoryContentPacket();
|
||||
$pk->windowId = ContainerIds::CREATIVE;
|
||||
if($this->getHolder()->getGamemode() === Player::CREATIVE){
|
||||
|
||||
if(!$this->getHolder()->isSpectator()){ //fill it for all gamemodes except spectator
|
||||
foreach(Item::getCreativeItems() as $i => $item){
|
||||
$pk->items[$i] = clone $item;
|
||||
}
|
||||
|
Reference in New Issue
Block a user