PHP Class pocketmine\command\Command

Mostrar archivo Open project: iTXTech/Genisys Class Usage Examples

Public Properties

Property Type Description
$timings pocketmine\event\TimingsHandler

Protected Properties

Property Type Description
$description string
$usageMessage string

Public Methods

Method Description
__construct ( string $name, string $description = "", string $usageMessage = null, array $aliases = [] )
__toString ( ) : string
broadcastCommandMessage ( pocketmine\command\CommandSender $source, string $message, boolean $sendToSource = true )
execute ( pocketmine\command\CommandSender $sender, string $commandLabel, array $args ) : mixed
getAliases ( ) : string[]
getDescription ( ) : string
getLabel ( ) : string
getName ( ) : string
getPermission ( ) : string
getPermissionMessage ( ) : string
getUsage ( ) : string
isRegistered ( ) : boolean
register ( pocketmine\command\CommandMap $commandMap ) : boolean Registers the command into a Command map
setAliases ( array $aliases )
setDescription ( string $description )
setLabel ( $name )
setPermission ( string | null $permission )
setPermissionMessage ( string $permissionMessage )
setUsage ( string $usage )
testPermission ( pocketmine\command\CommandSender $target ) : boolean
testPermissionSilent ( pocketmine\command\CommandSender $target ) : boolean
unregister ( pocketmine\command\CommandMap $commandMap ) : boolean

Private Methods

Method Description
allowChangesFrom ( pocketmine\command\CommandMap $commandMap ) : boolean

Method Details

__construct() public method

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

__toString() public method

public __toString ( ) : string
return string

broadcastCommandMessage() public static method

public static broadcastCommandMessage ( pocketmine\command\CommandSender $source, string $message, boolean $sendToSource = true )
$source pocketmine\command\CommandSender
$message string
$sendToSource boolean

execute() abstract public method

abstract public execute ( pocketmine\command\CommandSender $sender, string $commandLabel, array $args ) : mixed
$sender pocketmine\command\CommandSender
$commandLabel string
$args array
return mixed

getAliases() public method

public getAliases ( ) : string[]
return string[]

getDescription() public method

public getDescription ( ) : string
return string

getLabel() public method

public getLabel ( ) : string
return string

getName() public method

public getName ( ) : string
return string

getPermission() public method

public getPermission ( ) : string
return string

getPermissionMessage() public method

public getPermissionMessage ( ) : string
return string

getUsage() public method

public getUsage ( ) : string
return string

isRegistered() public method

public isRegistered ( ) : boolean
return boolean

register() public method

Registers the command into a Command map
public register ( pocketmine\command\CommandMap $commandMap ) : boolean
$commandMap pocketmine\command\CommandMap
return boolean

setAliases() public method

public setAliases ( array $aliases )
$aliases array

setDescription() public method

public setDescription ( string $description )
$description string

setLabel() public method

public setLabel ( $name )

setPermission() public method

public setPermission ( string | null $permission )
$permission string | null

setPermissionMessage() public method

public setPermissionMessage ( string $permissionMessage )
$permissionMessage string

setUsage() public method

public setUsage ( string $usage )
$usage string

testPermission() public method

public testPermission ( pocketmine\command\CommandSender $target ) : boolean
$target pocketmine\command\CommandSender
return boolean

testPermissionSilent() public method

public testPermissionSilent ( pocketmine\command\CommandSender $target ) : boolean
$target pocketmine\command\CommandSender
return boolean

unregister() public method

public unregister ( pocketmine\command\CommandMap $commandMap ) : boolean
$commandMap pocketmine\command\CommandMap
return boolean

Property Details

$description protected_oe property

protected string $description
return string

$timings public_oe property

public TimingsHandler,pocketmine\event $timings
return pocketmine\event\TimingsHandler

$usageMessage protected_oe property

protected string $usageMessage
return string