Player: Send all open inventories instead of hardcoded selection

Players have a few associated inventories which might need sending nowadays, such as main, armour, offhand (not implemented yet), cursor, crafting (if it ever worked). Under these conditions we should be sending all open windows.
This commit is contained in:
Dylan K. Taylor 2018-05-11 09:28:59 +01:00
parent 083ac8a770
commit 7e70569ba2

View File

@ -2143,8 +2143,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$this->sendPotionEffects($this);
$this->sendData($this);
$this->inventory->sendContents($this);
$this->armorInventory->sendContents($this);
$this->sendAllInventories();
$this->inventory->sendCreativeContents();
$this->inventory->sendHeldItem($this);
$this->dataPacket($this->server->getCraftingManager()->getCraftingDataPacket());
@ -3670,8 +3669,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$this->sendData($this->getViewers());
$this->sendSettings();
$this->inventory->sendContents($this);
$this->armorInventory->sendContents($this);
$this->sendAllInventories();
$this->spawnToAll();
$this->scheduleUpdate();