mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +00:00
backport ec0558597b6ca948228846b25751c2b1863cbf3f: CommandParameter: change byte1 field to "flags" (#3115)
This commit is contained in:
parent
447477c5fb
commit
cff2d37add
@ -227,7 +227,7 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
$parameter->paramName = $this->getString();
|
||||
$parameter->paramType = $this->getLInt();
|
||||
$parameter->isOptional = $this->getBool();
|
||||
$parameter->byte1 = $this->getByte();
|
||||
$parameter->flags = $this->getByte();
|
||||
|
||||
if($parameter->paramType & self::ARG_FLAG_ENUM){
|
||||
$index = ($parameter->paramType & 0xffff);
|
||||
@ -285,7 +285,7 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
|
||||
$this->putLInt($type);
|
||||
$this->putBool($parameter->isOptional);
|
||||
$this->putByte($parameter->byte1);
|
||||
$this->putByte($parameter->flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class CommandParameter{
|
||||
/** @var bool */
|
||||
public $isOptional;
|
||||
/** @var int */
|
||||
public $byte1 = 0; //unknown, always zero except for in /gamerule command
|
||||
public $flags = 0; //shows enum name if 1, always zero except for in /gamerule command
|
||||
/** @var CommandEnum|null */
|
||||
public $enum;
|
||||
/** @var string|null */
|
||||
|
Loading…
x
Reference in New Issue
Block a user