PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\command\Command Class Reference
+ Inheritance diagram for pocketmine\command\Command:
+ Collaboration diagram for pocketmine\command\Command:

Public Member Functions

 __construct ($name, $description="", $usageMessage=null, array $aliases=[])
 
 execute (CommandSender $sender, $commandLabel, array $args)
 
 getName ()
 
 getPermission ()
 
 setPermission ($permission)
 
 testPermission (CommandSender $target)
 
 testPermissionSilent (CommandSender $target)
 
 getLabel ()
 
 setLabel ($name)
 
 register (CommandMap $commandMap)
 
 unregister (CommandMap $commandMap)
 
 isRegistered ()
 
 getAliases ()
 
 getPermissionMessage ()
 
 getDescription ()
 
 getUsage ()
 
 setAliases (array $aliases)
 
 setDescription ($description)
 
 setPermissionMessage ($permissionMessage)
 
 setUsage ($usage)
 
 __toString ()
 

Static Public Member Functions

static broadcastCommandMessage (CommandSender $source, $message, $sendToSource=true)
 

Public Attributes

 $timings
 

Protected Attributes

 $description = ""
 
 $usageMessage
 

Detailed Description

Definition at line 31 of file Command.php.

Constructor & Destructor Documentation

pocketmine\command\Command::__construct (   $name,
  $description = "",
  $usageMessage = null,
array  $aliases = [] 
)
Parameters
string$name
string$description
string$usageMessage
string[]$aliases

Definition at line 75 of file Command.php.

Member Function Documentation

pocketmine\command\Command::__toString ( )
Returns
string

Definition at line 312 of file Command.php.

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

Definition at line 287 of file Command.php.

References pocketmine\Server\getInstance(), pocketmine\command\CommandSender\getName(), and pocketmine\command\CommandSender\sendMessage().

+ Here is the call graph for this function:

pocketmine\command\Command::execute ( CommandSender  $sender,
  $commandLabel,
array  $args 
)
abstract
Parameters
CommandSender$sender
string$commandLabel
string[]$args
Returns
mixed
pocketmine\command\Command::getAliases ( )
Returns
string[]

Definition at line 226 of file Command.php.

pocketmine\command\Command::getDescription ( )
Returns
string

Definition at line 240 of file Command.php.

pocketmine\command\Command::getLabel ( )
Returns
string

Definition at line 157 of file Command.php.

pocketmine\command\Command::getName ( )
Returns
string

Definition at line 98 of file Command.php.

pocketmine\command\Command::getPermission ( )
Returns
string

Definition at line 105 of file Command.php.

pocketmine\command\Command::getPermissionMessage ( )
Returns
string

Definition at line 233 of file Command.php.

pocketmine\command\Command::getUsage ( )
Returns
string

Definition at line 247 of file Command.php.

pocketmine\command\Command::isRegistered ( )
Returns
bool

Definition at line 219 of file Command.php.

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

+ Here is the caller graph for this function:

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

Registers the command into a Command map

Parameters
CommandMap$commandMap
Returns
bool

Definition at line 180 of file Command.php.

pocketmine\command\Command::setAliases ( array  $aliases)
Parameters
string[]$aliases

Definition at line 254 of file Command.php.

References pocketmine\command\Command\isRegistered().

+ Here is the call graph for this function:

pocketmine\command\Command::setDescription (   $description)
Parameters
string$description

Definition at line 264 of file Command.php.

pocketmine\command\Command::setPermission (   $permission)
Parameters
string | null$permission

Definition at line 112 of file Command.php.

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

Definition at line 271 of file Command.php.

pocketmine\command\Command::setUsage (   $usage)
Parameters
string$usage

Definition at line 278 of file Command.php.

pocketmine\command\Command::testPermission ( CommandSender  $target)
Parameters
CommandSender$target
Returns
bool

Definition at line 121 of file Command.php.

References pocketmine\command\CommandSender\sendMessage(), and pocketmine\command\Command\testPermissionSilent().

+ Here is the call graph for this function:

pocketmine\command\Command::testPermissionSilent ( CommandSender  $target)
Parameters
CommandSender$target
Returns
bool

Definition at line 140 of file Command.php.

References pocketmine\permission\Permissible\hasPermission().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

pocketmine\command\Command::unregister ( CommandMap  $commandMap)
Parameters
CommandMap$commandMap
Returns
bool

Definition at line 195 of file Command.php.


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