Merge branch '3.6' into 3.7

This commit is contained in:
Dylan K. Taylor 2019-03-21 19:02:20 +00:00
commit 9c01ecbe7e
3 changed files with 14 additions and 10 deletions

View File

@ -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){

View File

@ -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\"");
}

View File

@ -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: