From 75644b5df242bfcb435450ec19ae224c1f5057ce Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 8 Aug 2017 12:37:26 +0100 Subject: [PATCH] s/windowid/windowId --- src/pocketmine/Player.php | 10 +++++----- src/pocketmine/inventory/ContainerInventory.php | 4 ++-- .../network/mcpe/protocol/ContainerClosePacket.php | 6 +++--- .../network/mcpe/protocol/ContainerOpenPacket.php | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 6ef4d0a80..238e8c83a 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2789,17 +2789,17 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ } public function handleContainerClose(ContainerClosePacket $packet) : bool{ - if($this->spawned === false or $packet->windowid === 0){ + if($this->spawned === false or $packet->windowId === 0){ return true; } $this->craftingType = 0; $this->currentTransaction = null; - if(isset($this->windowIndex[$packet->windowid])){ - $this->server->getPluginManager()->callEvent(new InventoryCloseEvent($this->windowIndex[$packet->windowid], $this)); - $this->removeWindow($this->windowIndex[$packet->windowid]); + if(isset($this->windowIndex[$packet->windowId])){ + $this->server->getPluginManager()->callEvent(new InventoryCloseEvent($this->windowIndex[$packet->windowId], $this)); + $this->removeWindow($this->windowIndex[$packet->windowId]); }else{ - unset($this->windowIndex[$packet->windowid]); + unset($this->windowIndex[$packet->windowId]); } return true; diff --git a/src/pocketmine/inventory/ContainerInventory.php b/src/pocketmine/inventory/ContainerInventory.php index d49a7d822..a79af8618 100644 --- a/src/pocketmine/inventory/ContainerInventory.php +++ b/src/pocketmine/inventory/ContainerInventory.php @@ -32,7 +32,7 @@ abstract class ContainerInventory extends BaseInventory{ public function onOpen(Player $who){ parent::onOpen($who); $pk = new ContainerOpenPacket(); - $pk->windowid = $who->getWindowId($this); + $pk->windowId = $who->getWindowId($this); $pk->type = $this->getNetworkType(); $holder = $this->getHolder(); if($holder instanceof Vector3){ @@ -50,7 +50,7 @@ abstract class ContainerInventory extends BaseInventory{ public function onClose(Player $who){ $pk = new ContainerClosePacket(); - $pk->windowid = $who->getWindowId($this); + $pk->windowId = $who->getWindowId($this); $who->dataPacket($pk); parent::onClose($who); } diff --git a/src/pocketmine/network/mcpe/protocol/ContainerClosePacket.php b/src/pocketmine/network/mcpe/protocol/ContainerClosePacket.php index ad95bdf9f..fbfd32752 100644 --- a/src/pocketmine/network/mcpe/protocol/ContainerClosePacket.php +++ b/src/pocketmine/network/mcpe/protocol/ContainerClosePacket.php @@ -31,14 +31,14 @@ use pocketmine\network\mcpe\NetworkSession; class ContainerClosePacket extends DataPacket{ const NETWORK_ID = ProtocolInfo::CONTAINER_CLOSE_PACKET; - public $windowid; + public $windowId; protected function decodePayload(){ - $this->windowid = $this->getByte(); + $this->windowId = $this->getByte(); } protected function encodePayload(){ - $this->putByte($this->windowid); + $this->putByte($this->windowId); } public function handle(NetworkSession $session) : bool{ diff --git a/src/pocketmine/network/mcpe/protocol/ContainerOpenPacket.php b/src/pocketmine/network/mcpe/protocol/ContainerOpenPacket.php index b3ca9c792..ea616d3a7 100644 --- a/src/pocketmine/network/mcpe/protocol/ContainerOpenPacket.php +++ b/src/pocketmine/network/mcpe/protocol/ContainerOpenPacket.php @@ -31,7 +31,7 @@ use pocketmine\network\mcpe\NetworkSession; class ContainerOpenPacket extends DataPacket{ const NETWORK_ID = ProtocolInfo::CONTAINER_OPEN_PACKET; - public $windowid; + public $windowId; public $type; public $x; public $y; @@ -39,14 +39,14 @@ class ContainerOpenPacket extends DataPacket{ public $entityUniqueId = -1; protected function decodePayload(){ - $this->windowid = $this->getByte(); + $this->windowId = $this->getByte(); $this->type = $this->getByte(); $this->getBlockPosition($this->x, $this->y, $this->z); $this->entityUniqueId = $this->getEntityUniqueId(); } protected function encodePayload(){ - $this->putByte($this->windowid); + $this->putByte($this->windowId); $this->putByte($this->type); $this->putBlockPosition($this->x, $this->y, $this->z); $this->putEntityUniqueId($this->entityUniqueId);