diff --git a/src/pocketmine/inventory/BaseInventory.php b/src/pocketmine/inventory/BaseInventory.php index dfb1cb8626..3c9846c91f 100644 --- a/src/pocketmine/inventory/BaseInventory.php +++ b/src/pocketmine/inventory/BaseInventory.php @@ -428,7 +428,7 @@ abstract class BaseInventory implements Inventory{ $pk = new InventorySlotPacket(); $pk->inventorySlot = $index; - $pk->item = clone $this->getItem($index); + $pk->item = $this->getItem($index); foreach($target as $player){ if(($id = $player->getWindowId($this)) === -1){ diff --git a/src/pocketmine/inventory/PlayerCursorInventory.php b/src/pocketmine/inventory/PlayerCursorInventory.php index 818c438834..93f5422dc9 100644 --- a/src/pocketmine/inventory/PlayerCursorInventory.php +++ b/src/pocketmine/inventory/PlayerCursorInventory.php @@ -63,7 +63,7 @@ class PlayerCursorInventory extends BaseInventory{ $pk = new InventorySlotPacket(); $pk->inventorySlot = $index; - $pk->item = clone $this->getItem($index); + $pk->item = $this->getItem($index); foreach($target as $player){ if($player === $this->getHolder()){ diff --git a/src/pocketmine/inventory/PlayerInventory.php b/src/pocketmine/inventory/PlayerInventory.php index 816a7f85a8..b323a3c9eb 100644 --- a/src/pocketmine/inventory/PlayerInventory.php +++ b/src/pocketmine/inventory/PlayerInventory.php @@ -465,7 +465,7 @@ class PlayerInventory extends BaseInventory{ $pk = new InventorySlotPacket(); $pk->inventorySlot = $index; - $pk->item = clone $this->getItem($index); + $pk->item = $this->getItem($index); foreach($target as $player){ if($player === $this->getHolder()){