◆ __construct()
__construct |
( |
|
$name, |
|
|
Plugin |
$owner |
|
) |
| |
- Parameters
-
41 parent::__construct($name);
42 $this->owningPlugin = $owner;
43 $this->executor = $owner;
44 $this->usageMessage =
"";
◆ execute()
- Parameters
-
- Returns
- bool
56 if(!$this->owningPlugin->isEnabled()){
64 $success = $this->executor->onCommand($sender, $this, $commandLabel, $args);
66 if(!$success and $this->usageMessage !==
""){
67 $sender->sendMessage(
new TranslationContainer(
"commands.generic.usage", [$this->usageMessage]));
◆ getExecutor()
- Returns
- CommandExecutor|Plugin
77 return $this->executor;
◆ getPlugin()
◆ setExecutor()
- Parameters
-
84 $this->executor = ($executor != null) ? $executor : $this->owningPlugin;
The documentation for this class was generated from the following file:
- src/pocketmine/command/PluginCommand.php