BooleanArgument
extends StringEnumArgument
in package
Table of Contents
- VALUES = ["true" => true, "false" => false]
- $name : string
- $optional : bool
- $parameterData : CommandParameter
- __construct() : mixed
- canParse() : bool
- getEnumValues() : array<string|int, mixed>
- getName() : string
- getNetworkParameterData() : CommandParameter
- getNetworkType() : int
- getSpanLength() : int
- Returns how much command arguments it takes to build the full argument
- getTypeName() : string
- getValue() : mixed
- isOptional() : bool
- parse() : mixed
Constants
VALUES
protected
mixed
VALUES
= ["true" => true, "false" => false]
Properties
$name
protected
string
$name
$optional
protected
bool
$optional
= false
$parameterData
protected
CommandParameter
$parameterData
Methods
__construct()
public
__construct(string $name[, bool $optional = false ]) : mixed
Parameters
- $name : string
- $optional : bool = false
Return values
mixed —canParse()
public
abstract canParse(string $testString, CommandSender $sender) : bool
Parameters
- $testString : string
- $sender : CommandSender
Return values
bool —getEnumValues()
public
getEnumValues() : array<string|int, mixed>
Return values
array<string|int, mixed> —getName()
public
getName() : string
Return values
string —getNetworkParameterData()
public
getNetworkParameterData() : CommandParameter
Return values
CommandParameter —getNetworkType()
public
abstract getNetworkType() : int
Return values
int —getSpanLength()
Returns how much command arguments it takes to build the full argument
public
getSpanLength() : int
Return values
int —getTypeName()
public
getTypeName() : string
Return values
string —getValue()
public
getValue(string $string) : mixed
Parameters
- $string : string
Return values
mixed —isOptional()
public
isOptional() : bool
Return values
bool —parse()
public
parse(string $argument, CommandSender $sender) : mixed
Parameters
- $argument : string
- $sender : CommandSender