PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\command\PluginCommand Class Reference
+ Inheritance diagram for pocketmine\command\PluginCommand:
+ Collaboration diagram for pocketmine\command\PluginCommand:

Public Member Functions

 __construct (string $name, private Plugin $owner, private CommandExecutor $executor)
 
 __toString ()
 
 execute (CommandSender $sender, string $commandLabel, array $args)
 
 getAliases ()
 
 getDescription ()
 
 getExecutor ()
 
 getLabel ()
 
 getName ()
 
 getOwningPlugin ()
 
 getPermissionMessage ()
 
 getPermissions ()
 
 getUsage ()
 
 isRegistered ()
 
 register (CommandMap $commandMap)
 
 setAliases (array $aliases)
 
 setDescription (Translatable|string $description)
 
 setExecutor (CommandExecutor $executor)
 
 setLabel (string $name)
 
 setPermission (?string $permission)
 
 setPermissionMessage (string $permissionMessage)
 
 setPermissions (array $permissions)
 
 setUsage (Translatable|string $usage)
 
 testPermission (CommandSender $target, ?string $permission=null)
 
 testPermissionSilent (CommandSender $target, ?string $permission=null)
 
 unregister (CommandMap $commandMap)
 

Static Public Member Functions

static broadcastCommandMessage (CommandSender $source, Translatable|string $message, bool $sendToSource=true)
 

Protected Attributes

Translatable string $description = ""
 
Translatable string $usageMessage
 

Detailed Description

Definition at line 30 of file PluginCommand.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\command\PluginCommand::__construct ( string $name,
private Plugin $owner,
private CommandExecutor $executor )

Definition at line 31 of file PluginCommand.php.

Member Function Documentation

◆ __toString()

pocketmine\command\Command::__toString ( )
inherited

Definition at line 251 of file Command.php.

◆ broadcastCommandMessage()

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

Definition at line 233 of file Command.php.

◆ execute()

pocketmine\command\PluginCommand::execute ( CommandSender $sender,
string $commandLabel,
array $args )
Parameters
string[]$args
Returns
mixed
Exceptions
CommandException

Reimplemented from pocketmine\command\Command.

Definition at line 40 of file PluginCommand.php.

◆ getAliases()

pocketmine\command\Command::getAliases ( )
inherited
Returns
string[] @phpstan-return list<string>

Definition at line 194 of file Command.php.

◆ getDescription()

pocketmine\command\Command::getDescription ( )
inherited

Definition at line 202 of file Command.php.

◆ getExecutor()

pocketmine\command\PluginCommand::getExecutor ( )

Definition at line 59 of file PluginCommand.php.

◆ getLabel()

pocketmine\command\Command::getLabel ( )
inherited

Definition at line 142 of file Command.php.

◆ getName()

pocketmine\command\Command::getName ( )
inherited

Definition at line 89 of file Command.php.

◆ getOwningPlugin()

pocketmine\command\PluginCommand::getOwningPlugin ( )

Implements pocketmine\plugin\PluginOwned.

Definition at line 55 of file PluginCommand.php.

◆ getPermissionMessage()

pocketmine\command\Command::getPermissionMessage ( )
inherited

Definition at line 198 of file Command.php.

◆ getPermissions()

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

Definition at line 96 of file Command.php.

◆ getUsage()

pocketmine\command\Command::getUsage ( )
inherited

Definition at line 206 of file Command.php.

◆ isRegistered()

pocketmine\command\Command::isRegistered ( )
inherited

Definition at line 186 of file Command.php.

◆ register()

pocketmine\command\Command::register ( CommandMap $commandMap)
inherited

Registers the command into a Command map

Definition at line 160 of file Command.php.

◆ setAliases()

pocketmine\command\Command::setAliases ( array $aliases)
inherited
Parameters
string[]$aliases@phpstan-param list<string> $aliases

Definition at line 214 of file Command.php.

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

+ Here is the caller graph for this function:

◆ setDescription()

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

Definition at line 221 of file Command.php.

◆ setExecutor()

pocketmine\command\PluginCommand::setExecutor ( CommandExecutor $executor)

Definition at line 63 of file PluginCommand.php.

◆ setLabel()

pocketmine\command\Command::setLabel ( string $name)
inherited

Definition at line 146 of file Command.php.

◆ setPermission()

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

Definition at line 113 of file Command.php.

◆ setPermissionMessage()

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

Definition at line 225 of file Command.php.

◆ setPermissions()

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

Definition at line 103 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 $usage)
inherited

Definition at line 229 of file Command.php.

◆ testPermission()

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

Definition at line 117 of file Command.php.

◆ testPermissionSilent()

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

Definition at line 131 of file Command.php.

◆ unregister()

pocketmine\command\Command::unregister ( CommandMap $commandMap)
inherited

Definition at line 170 of file Command.php.

Member Data Documentation

◆ $description

Translatable string pocketmine\command\Command::$description = ""
protectedinherited

Definition at line 61 of file Command.php.

◆ $usageMessage

Translatable string pocketmine\command\Command::$usageMessage
protectedinherited

Definition at line 63 of file Command.php.


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