Phpcraft
|
Public Member Functions | |
__construct (Plugin $plugin, array $names, $required_permission, callable $function) | |
getCanonicalName () | |
call (CommandSender &$sender, array $args) | |
isUsableBy (CommandSender &$sender) | |
getSyntax () | |
Static Public Member Functions | |
static | handleMessage (CommandSender &$sender, string $msg) |
static | get (string $name) |
static | getProvider ($type) |
Public Attributes | |
$plugin | |
$names | |
$required_sender_class | |
$required_permission | |
$params | |
Phpcraft\Command\Command::__construct | ( | Plugin | $plugin, |
array | $names, | ||
$required_permission, | |||
callable | $function | ||
) |
@noinspection PhpDeprecationInspection
@noinspection PhpDeprecationInspection
Phpcraft\Command\Command::call | ( | CommandSender & | $sender, |
array | $args | ||
) |
Calls the command using the given string arguments.
CommandSender | $sender | |
array<string> | $args |
|
static |
Returns a command using one of its names or null if not found.
string | $name |
Phpcraft\Command\Command::getCanonicalName | ( | ) |
|
static |
ReflectionType | null | $type |
@noinspection PhpDeprecationInspection
Phpcraft\Command\Command::getSyntax | ( | ) |
|
static |
Handles a message, which may be a command, in which case it will be executed.
CommandSender | $sender | |
string | $msg |
Phpcraft\Command\Command::isUsableBy | ( | CommandSender & | $sender | ) |
Returns true if the given CommandSender fulfils the class & permission requirements.
CommandSender | $sender |
array< string > Phpcraft\Command\Command::$names |
array< ReflectionParameter > Phpcraft\Command\Command::$params |
Plugin Phpcraft\Command\Command::$plugin |
string null Phpcraft\Command\Command::$required_permission |
string null Phpcraft\Command\Command::$required_sender_class |