Interfaces, Classes, Traits and Enums
- CommandMap
Table of Contents
-
$knownCommands
: array<string|int, Command>
-
$server
: Server
-
__construct()
: mixed
-
clearCommands()
: void
-
dispatch()
: bool
-
getCommand()
: Command|null
-
getCommands()
: array<string|int, Command>
-
register()
: bool
-
registerAll()
: void
-
registerServerAliases()
: void
-
unregister()
: bool
-
registerAlias()
: bool
-
setDefaultCommands()
: void
$knownCommands
protected
array<string|int, Command>
$knownCommands
= []
$server
private
Server
$server
__construct()
public
__construct(Server $server) : mixed
Parameters
-
$server
: Server
-
Return values
mixed
—
clearCommands()
public
clearCommands() : void
Return values
void
—
dispatch()
public
dispatch(CommandSender $sender, string $commandLine) : bool
Parameters
-
$sender
: CommandSender
-
-
$commandLine
: string
-
Return values
bool
—
getCommand()
public
getCommand(string $name) : Command|null
Parameters
-
$name
: string
-
Return values
Command|null
—
getCommands()
public
getCommands() : array<string|int, Command>
Return values
array<string|int, Command>
—
register()
public
register(string $fallbackPrefix, Command $command[, string|null $label = null ]) : bool
Parameters
-
$fallbackPrefix
: string
-
-
$command
: Command
-
-
$label
: string|null
= null
-
Return values
bool
—
registerAll()
public
registerAll(string $fallbackPrefix, array<string|int, mixed> $commands) : void
Parameters
-
$fallbackPrefix
: string
-
-
$commands
: array<string|int, mixed>
-
Return values
void
—
registerServerAliases()
public
registerServerAliases() : void
Return values
void
—
unregister()
public
unregister(Command $command) : bool
Parameters
-
$command
: Command
-
Return values
bool
—
registerAlias()
private
registerAlias(Command $command, bool $isAlias, string $fallbackPrefix, string $label) : bool
Parameters
-
$command
: Command
-
-
$isAlias
: bool
-
-
$fallbackPrefix
: string
-
-
$label
: string
-
Return values
bool
—
setDefaultCommands()
private
setDefaultCommands() : void
Return values
void
—