StringEnumArgument
extends BaseArgument
in package
Table of Contents
- VALUES = []
- $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
= []
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
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
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
abstract 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
abstract parse(string $argument, CommandSender $sender) : mixed
Parameters
- $argument : string
- $sender : CommandSender