FormattedCommandAlias
extends Command
in package
Table of Contents
- $timings : TimingsHandler|null
- $description : Translatable|string
- $usageMessage : Translatable|string
- $activeAliases : array<string|int, string>
- $aliases : array<string|int, string>
- $commandMap : CommandMap|null
- $formatStrings : array<string|int, string>
- $label : string
- $name : string
- $nextLabel : string
- $permission : string|null
- $permissionMessage : string|null
- __construct() : mixed
- __toString() : string
- broadcastCommandMessage() : void
- execute() : mixed
- getAliases() : array<string|int, string>
- getDescription() : Translatable|string
- getLabel() : string
- getName() : string
- getPermission() : string|null
- getPermissionMessage() : string|null
- getUsage() : Translatable|string
- isRegistered() : bool
- register() : bool
- Registers the command into a Command map
- setAliases() : void
- setDescription() : void
- setLabel() : bool
- setPermission() : void
- setPermissionMessage() : void
- setUsage() : void
- testPermission() : bool
- testPermissionSilent() : bool
- unregister() : bool
- allowChangesFrom() : bool
- buildCommand() : string
- inRange() : bool
Properties
$timings
public
TimingsHandler|null
$timings
= null
$description
protected
Translatable|string
$description
= ""
$usageMessage
protected
Translatable|string
$usageMessage
$activeAliases
private
array<string|int, string>
$activeAliases
= []
$aliases
private
array<string|int, string>
$aliases
= []
$commandMap
private
CommandMap|null
$commandMap
= null
$formatStrings
private
array<string|int, string>
$formatStrings
= []
$label
private
string
$label
$name
private
string
$name
$nextLabel
private
string
$nextLabel
$permission
private
string|null
$permission
= null
$permissionMessage
private
string|null
$permissionMessage
= null
Methods
__construct()
public
__construct(string $alias, array<string|int, string> $formatStrings) : mixed
Parameters
- $alias : string
- $formatStrings : array<string|int, string>
Return values
mixed —__toString()
public
__toString() : string
Return values
string —broadcastCommandMessage()
public
static broadcastCommandMessage(CommandSender $source, Translatable|string $message[, bool $sendToSource = true ]) : void
Parameters
- $source : CommandSender
- $message : Translatable|string
- $sendToSource : bool = true
Return values
void —execute()
public
execute(CommandSender $sender, string $commandLabel, array<string|int, mixed> $args) : mixed
Parameters
- $sender : CommandSender
- $commandLabel : string
- $args : array<string|int, mixed>
Return values
mixed —getAliases()
public
getAliases() : array<string|int, string>
Return values
array<string|int, string> —getDescription()
public
getDescription() : Translatable|string
Return values
Translatable|string —getLabel()
public
getLabel() : string
Return values
string —getName()
public
getName() : string
Return values
string —getPermission()
public
getPermission() : string|null
Return values
string|null —getPermissionMessage()
public
getPermissionMessage() : string|null
Return values
string|null —getUsage()
public
getUsage() : Translatable|string
Return values
Translatable|string —isRegistered()
public
isRegistered() : bool
Return values
bool —register()
Registers the command into a Command map
public
register(CommandMap $commandMap) : bool
Parameters
- $commandMap : CommandMap
Return values
bool —setAliases()
public
setAliases(array<string|int, string> $aliases) : void
Parameters
- $aliases : array<string|int, string>
Return values
void —setDescription()
public
setDescription(Translatable|string $description) : void
Parameters
- $description : Translatable|string
Return values
void —setLabel()
public
setLabel(string $name) : bool
Parameters
- $name : string
Return values
bool —setPermission()
public
setPermission(string|null $permission) : void
Parameters
- $permission : string|null
Return values
void —setPermissionMessage()
public
setPermissionMessage(string $permissionMessage) : void
Parameters
- $permissionMessage : string
Return values
void —setUsage()
public
setUsage(Translatable|string $usage) : void
Parameters
- $usage : Translatable|string
Return values
void —testPermission()
public
testPermission(CommandSender $target[, string|null $permission = null ]) : bool
Parameters
- $target : CommandSender
- $permission : string|null = null
Return values
bool —testPermissionSilent()
public
testPermissionSilent(CommandSender $target[, string|null $permission = null ]) : bool
Parameters
- $target : CommandSender
- $permission : string|null = null
Return values
bool —unregister()
public
unregister(CommandMap $commandMap) : bool
Parameters
- $commandMap : CommandMap
Return values
bool —allowChangesFrom()
private
allowChangesFrom(CommandMap $commandMap) : bool
Parameters
- $commandMap : CommandMap
Return values
bool —buildCommand()
private
buildCommand(string $formatString, array<string|int, string> $args) : string
Parameters
- $formatString : string
- $args : array<string|int, string>
Return values
string —inRange()
private
static inRange(int $i, int $j, int $k) : bool
Parameters
- $i : int
- $j : int
- $k : int