Send creative inventory for all gamemodes, fixed recipe book

This commit is contained in:
Dylan K. Taylor
2017-09-12 14:40:05 +01:00
parent 1d31958ce6
commit 297172d111
2 changed files with 5 additions and 7 deletions

View File

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