diff --git a/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php b/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php index 7af1fd45bd..0ec90bd3ab 100644 --- a/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php +++ b/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php @@ -154,7 +154,7 @@ class NetworkInventoryAction{ $window = $player->getWindow($this->windowId); if($window !== null){ - return new SlotChangeAction($player->getWindow($this->windowId), $this->inventorySlot, $this->oldItem, $this->newItem); + return new SlotChangeAction($window, $this->inventorySlot, $this->oldItem, $this->newItem); } throw new \InvalidStateException("Player " . $player->getName() . " has no open container with window ID $this->windowId");