Fix adventure settings not updated for GUI gamemode changes

This commit is contained in:
Dylan K. Taylor 2016-11-28 11:25:29 +00:00
parent 367fa41161
commit b1ce19856f

View File

@ -1154,11 +1154,12 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$pk = new SetPlayerGameTypePacket();
$pk->gamemode = $this->gamemode & 0x01;
$this->dataPacket($pk);
$this->sendSettings();
}else{
Command::broadcastCommandMessage($this, new TranslationContainer("commands.gamemode.success.self", [Server::getGamemodeString($gm)]));
}
$this->sendSettings();
$this->inventory->sendContents($this);
$this->inventory->sendContents($this->getViewers());
$this->inventory->sendHeldItem($this->hasSpawned);