diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index f01273a4f..ddf6f4ac5 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -2583,7 +2583,8 @@ class Server{ $this->getLogger()->debug("[Auto Save] Saving worlds..."); $start = microtime(true); $this->doAutoSave(); - $this->getLogger()->debug("[Auto Save] Save completed in " . round(microtime(true) - $start, 3) . "s"); + $time = (microtime(true) - $start); + $this->getLogger()->debug("[Auto Save] Save completed in " . ($time >= 1 ? round($time, 3) . "s" : round($time * 1000) . "ms")); } if($this->sendUsageTicker > 0 and --$this->sendUsageTicker === 0){ diff --git a/src/pocketmine/level/generator/Flat.php b/src/pocketmine/level/generator/Flat.php index 153fb5783..c3672ba8e 100644 --- a/src/pocketmine/level/generator/Flat.php +++ b/src/pocketmine/level/generator/Flat.php @@ -106,7 +106,7 @@ class Flat extends Generator{ $split = array_map('\trim', explode(',', $layers)); $y = 0; foreach($split as $line){ - preg_match('#^(?:(\d+)x)?(.+)$#', $line, $matches); + preg_match('#^(?:(\d+)[x|*])?(.+)$#', $line, $matches); if(count($matches) !== 3){ throw new InvalidGeneratorOptionsException("Invalid preset layer \"$line\""); } diff --git a/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php b/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php index 48cea843e..405ae8efe 100644 --- a/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php +++ b/src/pocketmine/network/mcpe/protocol/AvailableCommandsPacket.php @@ -55,19 +55,22 @@ class AvailableCommandsPacket extends DataPacket{ public const ARG_TYPE_FLOAT = 0x02; public const ARG_TYPE_VALUE = 0x03; public const ARG_TYPE_WILDCARD_INT = 0x04; - public const ARG_TYPE_TARGET = 0x05; - public const ARG_TYPE_WILDCARD_TARGET = 0x06; + public const ARG_TYPE_OPERATOR = 0x05; + public const ARG_TYPE_TARGET = 0x06; - public const ARG_TYPE_STRING = 0x0f; - public const ARG_TYPE_POSITION = 0x10; + public const ARG_TYPE_FILEPATH = 0x0f; - public const ARG_TYPE_MESSAGE = 0x13; + public const ARG_TYPE_STRING = 0x1c; - public const ARG_TYPE_RAWTEXT = 0x15; + public const ARG_TYPE_POSITION = 0x1e; - public const ARG_TYPE_JSON = 0x18; + public const ARG_TYPE_MESSAGE = 0x21; - public const ARG_TYPE_COMMAND = 0x1f; + public const ARG_TYPE_RAWTEXT = 0x23; + + public const ARG_TYPE_JSON = 0x26; + + public const ARG_TYPE_COMMAND = 0x2d; /** * Enums are a little different: they are composed as follows: