PocketMine
Command Class Reference
Inheritance diagram for Command:
VanillaCommand FormattedCommandAlias PluginCommand BanCommand BanIpCommand BanListCommand DefaultGamemodeCommand DeopCommand DifficultyCommand DumpMemoryCommand EffectCommand EnchantCommand GamemodeCommand GarbageCollectorCommand GiveCommand HelpCommand KickCommand KillCommand ListCommand MeCommand OpCommand PardonCommand PardonIpCommand ParticleCommand PluginsCommand ReloadCommand SaveCommand SaveOffCommand SaveOnCommand SayCommand SeedCommand SetWorldSpawnCommand SpawnpointCommand StatusCommand StopCommand TeleportCommand TellCommand TimeCommand TimingsCommand VersionCommand WhitelistCommand

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)
 

Data Fields

 $timings
 

Protected Attributes

 $description = ""
 
 $usageMessage
 

Constructor & Destructor Documentation

__construct (   $name,
  $description = "",
  $usageMessage = null,
array  $aliases = [] 
)
Parameters
string$name
string$description
string$usageMessage
string[]$aliases

Member Function Documentation

__toString ( )
Returns
string
static broadcastCommandMessage ( CommandSender  $source,
  $message,
  $sendToSource = true 
)
static
Parameters
CommandSender$source
string$message
bool$sendToSource
execute ( CommandSender  $sender,
  $commandLabel,
array  $args 
)
abstract
Parameters
CommandSender$sender
string$commandLabel
string[]$args
Returns
mixed
getAliases ( )
Returns
string[]
getDescription ( )
Returns
string
getLabel ( )
Returns
string
getName ( )
Returns
string
getPermission ( )
Returns
string
getPermissionMessage ( )
Returns
string
getUsage ( )
Returns
string
isRegistered ( )
Returns
bool
register ( CommandMap  $commandMap)

Registers the command into a Command map

Parameters
CommandMap$commandMap
Returns
bool
setAliases ( array  $aliases)
Parameters
string[]$aliases
setDescription (   $description)
Parameters
string$description
setPermission (   $permission)
Parameters
string | null$permission
setPermissionMessage (   $permissionMessage)
Parameters
string$permissionMessage
setUsage (   $usage)
Parameters
string$usage
testPermission ( CommandSender  $target)
Parameters
CommandSender$target
Returns
bool
testPermissionSilent ( CommandSender  $target)
Parameters
CommandSender$target
Returns
bool
unregister ( CommandMap  $commandMap)
Parameters
CommandMap$commandMap
Returns
bool

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