pocketmine\command\Command::__construct PHP Method

__construct() public method

public __construct ( string $name, string $description = "", string $usageMessage = null, array $aliases = [] )
$name string
$description string
$usageMessage string
$aliases array
    public function __construct($name, $description = "", $usageMessage = null, array $aliases = [])
    {
        $this->name = $name;
        $this->nextLabel = $name;
        $this->label = $name;
        $this->description = $description;
        $this->usageMessage = $usageMessage === null ? "/" . $name : $usageMessage;
        $this->aliases = $aliases;
        $this->activeAliases = (array) $aliases;
        $this->timings = new TimingsHandler("** Command: " . $name);
    }

Usage Example

コード例 #1
1
ファイル: SeeMoneyCommand.php プロジェクト: dog194/EconomyS
 public function __construct(EconomyAPI $plugin)
 {
     $desc = $plugin->getCommandMessage("seemoney");
     parent::__construct("seemoney", $desc["description"], $desc["usage"]);
     $this->setPermission("economyapi.command.seemoney");
     $this->plugin = $plugin;
 }
All Usage Examples Of pocketmine\command\Command::__construct