|
PocketMine-MP 5.37.1 git-da6732df2656426fbd1b7898ed06c8286969d2f1
|
Inheritance diagram for pocketmine\command\Command:
Collaboration diagram for pocketmine\command\Command:Public Member Functions | |
| __construct (string $namespace, string $name, private Translatable|string $description="", private Translatable|string|null $usageMessage=null) | |
| execute (CommandSender $sender, string $commandLabel, array $args) | |
| getDescription () | |
| getId () | |
| getName () | |
| getNamespace () | |
| getPermissionMessage () | |
| getPermissions () | |
| getUsage () | |
| setDescription (Translatable|string $description) | |
| setPermission (?string $permission) | |
| setPermissionMessage (Translatable|string $permissionMessage) | |
| setPermissions (array $permissions) | |
| setUsage (Translatable|string|null $usage) | |
| testPermission (string $context, CommandSender $target, ?string $permission=null) | |
| testPermissionSilent (CommandSender $target, ?string $permission=null) | |
Static Public Member Functions | |
| static | broadcastCommandMessage (CommandSender $source, Translatable|string $message, bool $sendToSource=true) |
Definition at line 43 of file Command.php.
| pocketmine\command\Command::__construct | ( | string | $namespace, |
| string | $name, | ||
| private Translatable|string | $description = "", | ||
| private Translatable|string|null | $usageMessage = null ) |
Definition at line 51 of file Command.php.
|
static |
Definition at line 175 of file Command.php.
|
abstract |
| string[] | $args | @phpstan-param list<string> $args |
| CommandException |
Reimplemented in pocketmine\command\ClosureCommand, pocketmine\command\defaults\BanCommand, pocketmine\command\defaults\BanIpCommand, pocketmine\command\defaults\BanListCommand, pocketmine\command\defaults\ClearCommand, pocketmine\command\defaults\CommandAliasCommand, pocketmine\command\defaults\DefaultGamemodeCommand, pocketmine\command\defaults\DeopCommand, pocketmine\command\defaults\DifficultyCommand, pocketmine\command\defaults\DumpMemoryCommand, pocketmine\command\defaults\EffectCommand, pocketmine\command\defaults\EnchantCommand, pocketmine\command\defaults\GamemodeCommand, pocketmine\command\defaults\GarbageCollectorCommand, pocketmine\command\defaults\GiveCommand, pocketmine\command\defaults\HelpCommand, pocketmine\command\defaults\KickCommand, pocketmine\command\defaults\KillCommand, pocketmine\command\defaults\ListCommand, pocketmine\command\defaults\MeCommand, pocketmine\command\defaults\OpCommand, pocketmine\command\defaults\PardonCommand, pocketmine\command\defaults\PardonIpCommand, pocketmine\command\defaults\ParticleCommand, pocketmine\command\defaults\PluginsCommand, pocketmine\command\defaults\SaveCommand, pocketmine\command\defaults\SaveOffCommand, pocketmine\command\defaults\SaveOnCommand, pocketmine\command\defaults\SayCommand, pocketmine\command\defaults\SeedCommand, pocketmine\command\defaults\SetWorldSpawnCommand, pocketmine\command\defaults\SpawnpointCommand, pocketmine\command\defaults\StatusCommand, pocketmine\command\defaults\StopCommand, pocketmine\command\defaults\TeleportCommand, pocketmine\command\defaults\TellCommand, pocketmine\command\defaults\TimeCommand, pocketmine\command\defaults\TimingsCommand, pocketmine\command\defaults\TitleCommand, pocketmine\command\defaults\TransferServerCommand, pocketmine\command\defaults\VersionCommand, pocketmine\command\defaults\WhitelistCommand, pocketmine\command\defaults\XpCommand, pocketmine\command\FormattedCommandAlias, and pocketmine\command\PluginCommand.
| pocketmine\command\Command::getDescription | ( | ) |
Definition at line 155 of file Command.php.
|
final |
Returns the globally unique ID for the command. This typically looks like namespace:name
Definition at line 92 of file Command.php.
Referenced by pocketmine\command\defaults\CommandAliasCommand\execute().
Here is the caller graph for this function:
|
final |
Returns the local identifier of the command (without namespace or leading slash). This cannot be changed after creation.
Definition at line 85 of file Command.php.
|
final |
Definition at line 77 of file Command.php.
| pocketmine\command\Command::getPermissionMessage | ( | ) |
Definition at line 151 of file Command.php.
| pocketmine\command\Command::getPermissions | ( | ) |
Definition at line 99 of file Command.php.
| pocketmine\command\Command::getUsage | ( | ) |
Definition at line 159 of file Command.php.
| pocketmine\command\Command::setDescription | ( | Translatable|string | $description | ) |
Definition at line 163 of file Command.php.
| pocketmine\command\Command::setPermission | ( | ?string | $permission | ) |
Definition at line 116 of file Command.php.
| pocketmine\command\Command::setPermissionMessage | ( | Translatable|string | $permissionMessage | ) |
Definition at line 167 of file Command.php.
| pocketmine\command\Command::setPermissions | ( | array | $permissions | ) |
| string[] | $permissions |
Definition at line 106 of file Command.php.
Referenced by pocketmine\command\ClosureCommand\__construct().
Here is the caller graph for this function:| pocketmine\command\Command::setUsage | ( | Translatable|string|null | $usage | ) |
Definition at line 171 of file Command.php.
| pocketmine\command\Command::testPermission | ( | string | $context, |
| CommandSender | $target, | ||
| ?string | $permission = null ) |
| string | $context | usually the command name, but may include extra args if useful (e.g. for subcommands) |
| CommandSender | $target | the target to check the permission for |
| string | null | $permission | the permission to check, if null, will check if the target has any of the command's permissions |
Definition at line 125 of file Command.php.
Referenced by pocketmine\command\defaults\CommandAliasCommand\execute(), pocketmine\command\defaults\TimeCommand\execute(), and pocketmine\command\defaults\WhitelistCommand\execute().
Here is the caller graph for this function:| pocketmine\command\Command::testPermissionSilent | ( | CommandSender | $target, |
| ?string | $permission = null ) |
Definition at line 140 of file Command.php.