diff --git a/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php b/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php index a2f6080dd..0412492e7 100644 --- a/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php +++ b/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php @@ -102,13 +102,10 @@ class AvailableCommandsPacket extends DataPacket{ public $commandData = []; protected function decodePayload(){ - for($i = 0, $count = $this->getUnsignedVarInt(); $i < $count; ++$i){ + for($i = 0, $this->enumValuesCount = $this->getUnsignedVarInt(); $i < $this->enumValuesCount; ++$i){ $this->enumValues[] = $this->getString(); } - $this->enumValuesCount = count($this->enumValues); - - for($i = 0, $count = $this->getUnsignedVarInt(); $i < $count; ++$i){ $this->postfixes[] = $this->getString(); }