Inventory: Split up armor and player inventory (#1957)

* Inventory: Split up PlayerInventory and armour handling
* Fixed other players don't see armour changes. This bug also exists on master.
This commit is contained in:
Dylan K. Taylor
2018-01-23 20:01:26 +00:00
committed by GitHub
parent 0bf5ab76fb
commit 6543d96910
8 changed files with 198 additions and 235 deletions

View File

@ -25,7 +25,6 @@ namespace pocketmine\inventory\transaction;
use pocketmine\event\inventory\InventoryTransactionEvent;
use pocketmine\inventory\Inventory;
use pocketmine\inventory\PlayerInventory;
use pocketmine\inventory\transaction\action\InventoryAction;
use pocketmine\inventory\transaction\action\SlotChangeAction;
use pocketmine\item\Item;
@ -239,9 +238,6 @@ class InventoryTransaction{
protected function sendInventories() : void{
foreach($this->inventories as $inventory){
$inventory->sendContents($this->source);
if($inventory instanceof PlayerInventory){
$inventory->sendArmorContents($this->source);
}
}
}