PocketMine-MP 5.35.1 git-f412a390b8f63d0311cc1d1c81046404153b8440
Loading...
Searching...
No Matches
pocketmine\command\defaults\CommandAliasCommand Class Reference
+ Inheritance diagram for pocketmine\command\defaults\CommandAliasCommand:
+ Collaboration diagram for pocketmine\command\defaults\CommandAliasCommand:

Public Member Functions

 __construct (string $namespace, string $name)
 
 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)
 

Detailed Description

Definition at line 41 of file CommandAliasCommand.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\command\defaults\CommandAliasCommand::__construct ( string $namespace,
string $name )

Definition at line 46 of file CommandAliasCommand.php.

Member Function Documentation

◆ broadcastCommandMessage()

static pocketmine\command\Command::broadcastCommandMessage ( CommandSender $source,
Translatable|string $message,
bool $sendToSource = true )
staticinherited

Definition at line 175 of file Command.php.

◆ execute()

pocketmine\command\defaults\CommandAliasCommand::execute ( CommandSender $sender,
string $commandLabel,
array $args )
Parameters
string[]$args@phpstan-param list<string> $args
Returns
mixed
Exceptions
CommandException

Reimplemented from pocketmine\command\Command.

Definition at line 56 of file CommandAliasCommand.php.

References pocketmine\command\CommandSender\getCommandAliasMap(), pocketmine\command\Command\getId(), and pocketmine\command\Command\testPermission().

+ Here is the call graph for this function:

◆ getDescription()

pocketmine\command\Command::getDescription ( )
inherited

Definition at line 155 of file Command.php.

◆ getId()

pocketmine\command\Command::getId ( )
finalinherited

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:

◆ getName()

pocketmine\command\Command::getName ( )
finalinherited

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.

◆ getNamespace()

pocketmine\command\Command::getNamespace ( )
finalinherited

Definition at line 77 of file Command.php.

◆ getPermissionMessage()

pocketmine\command\Command::getPermissionMessage ( )
inherited

Definition at line 151 of file Command.php.

◆ getPermissions()

pocketmine\command\Command::getPermissions ( )
inherited
Returns
string[]

Definition at line 99 of file Command.php.

◆ getUsage()

pocketmine\command\Command::getUsage ( )
inherited

Definition at line 159 of file Command.php.

◆ setDescription()

pocketmine\command\Command::setDescription ( Translatable|string $description)
inherited

Definition at line 163 of file Command.php.

◆ setPermission()

pocketmine\command\Command::setPermission ( ?string $permission)
inherited

Definition at line 116 of file Command.php.

◆ setPermissionMessage()

pocketmine\command\Command::setPermissionMessage ( Translatable|string $permissionMessage)
inherited

Definition at line 167 of file Command.php.

◆ setPermissions()

pocketmine\command\Command::setPermissions ( array $permissions)
inherited
Parameters
string[]$permissions

Definition at line 106 of file Command.php.

Referenced by pocketmine\command\ClosureCommand\__construct().

+ Here is the caller graph for this function:

◆ setUsage()

pocketmine\command\Command::setUsage ( Translatable|string|null $usage)
inherited

Definition at line 171 of file Command.php.

◆ testPermission()

pocketmine\command\Command::testPermission ( string $context,
CommandSender $target,
?string $permission = null )
inherited
Parameters
string$contextusually the command name, but may include extra args if useful (e.g. for subcommands)
CommandSender$targetthe target to check the permission for
string | null$permissionthe 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:

◆ testPermissionSilent()

pocketmine\command\Command::testPermissionSilent ( CommandSender $target,
?string $permission = null )
inherited

Definition at line 140 of file Command.php.


The documentation for this class was generated from the following file: