Merge branch '3.5'

This commit is contained in:
Dylan K. Taylor
2019-01-04 23:28:44 +00:00
258 changed files with 1322 additions and 40 deletions

View File

@ -29,6 +29,13 @@ use pocketmine\network\mcpe\handler\SessionHandler;
use pocketmine\network\mcpe\protocol\types\CommandData;
use pocketmine\network\mcpe\protocol\types\CommandEnum;
use pocketmine\network\mcpe\protocol\types\CommandParameter;
use function array_flip;
use function array_keys;
use function array_map;
use function array_search;
use function array_values;
use function count;
use function dechex;
class AvailableCommandsPacket extends DataPacket{
public const NETWORK_ID = ProtocolInfo::AVAILABLE_COMMANDS_PACKET;
@ -346,13 +353,13 @@ class AvailableCommandsPacket extends DataPacket{
}
}
$this->enumValues = array_map('strval', array_keys($enumValuesMap)); //stupid PHP key casting D:
$this->enumValues = array_map('\strval', array_keys($enumValuesMap)); //stupid PHP key casting D:
$this->putUnsignedVarInt($this->enumValuesCount = count($this->enumValues));
foreach($this->enumValues as $enumValue){
$this->putString($enumValue);
}
$this->postfixes = array_map('strval', array_keys($postfixesMap));
$this->postfixes = array_map('\strval', array_keys($postfixesMap));
$this->putUnsignedVarInt(count($this->postfixes));
foreach($this->postfixes as $postfix){
$this->putString($postfix);