本文整理汇总了PHP中EssentialsPE\BaseFiles\BaseCommand::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseCommand::__construct方法的具体用法?PHP BaseCommand::__construct怎么用?PHP BaseCommand::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EssentialsPE\BaseFiles\BaseCommand
的用法示例。
在下文中一共展示了BaseCommand::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param BaseAPI $api
* @param string $name
* @param string $description
* @param null|string $usageMessage
* @param bool|null|string $consoleUsageMessage
* @param array $aliases
*/
public function __construct(BaseAPI $api, $name, $description = "", $usageMessage = null, $consoleUsageMessage = true, array $aliases = [])
{
parent::__construct($api, $name, $description, $usageMessage, $consoleUsageMessage, $aliases);
// Special part :D
$commandMap = $api->getServer()->getCommandMap();
$command = $commandMap->getCommand($name);
$command->setLabel($name . "_disabled");
$command->unregister($commandMap);
}
示例2: __construct
/**
* @param Loader $plugin
*/
public function __construct(Loader $plugin)
{
parent::__construct($plugin, "nuke", "Thin carpet of bomb", "/nuke [player]", null);
$this->setPermission("essentials.nuke");
}
示例3: __construct
/**
* @param BaseAPI $api
*/
public function __construct(BaseAPI $api)
{
parent::__construct($api, "tpahere", "Request a player to teleport to your position", "<player>", false);
$this->setPermission("essentials.tpahere");
}
示例4: __construct
/**
* @param Loader $plugin
*/
public function __construct(Loader $plugin)
{
parent::__construct($plugin, "jump", "Teleport you to the block you're looking at", "/jump", false, ["j", "jumpto"]);
$this->setPermission("essentials.jump");
}
示例5: __construct
/**
* @param BaseAPI $api
*/
public function __construct(BaseAPI $api)
{
parent::__construct($api, "heal", "Heal yourself or other player", "[player]");
$this->setPermission("essentials.heal.use");
}
示例6: __construct
/**
* @param Loader $plugin
*/
public function __construct(Loader $plugin)
{
parent::__construct($plugin, "seen", "See player's last played time", "/seen <player>");
$this->setPermission("essentials.seen");
}
示例7: __construct
/**
* @param BaseAPI $api
*/
public function __construct(BaseAPI $api)
{
parent::__construct($api, "clearinventory", "Clear your/other's inventory", "[player]", true, ["ci", "clean", "clearinvent"]);
$this->setPermission("essentials.clearinventory.use");
}
示例8: __construct
/**
* @param BaseAPI $api
*/
public function __construct(BaseAPI $api)
{
parent::__construct($api, "essentials", "Get current Essentials version", "[update <check|install>]", true, ["essentials", "ess", "esspe"]);
$this->setPermission("essentials.essentials");
}
示例9: __construct
/**
* @param Loader $plugin
*/
public function __construct(Loader $plugin)
{
parent::__construct($plugin, "near", "List the players near to you", "/near [player]", null, ["nearby"]);
$this->setPermission("essentials.near.use");
}
示例10: __construct
/**
* @param BaseAPI $api
*/
public function __construct(BaseAPI $api)
{
parent::__construct($api, "jump", "Teleport you to the block you're looking at", null, false, ["j", "jumpto"]);
$this->setPermission("essentials.jump");
}
示例11: __construct
/**
* @param BaseAPI $api
*/
public function __construct(BaseAPI $api)
{
parent::__construct($api, "top", "Teleport to the highest block above you", null, false);
$this->setPermission("essentials.top");
}
示例12: __construct
/**
* @param BaseAPI $api
*/
public function __construct(BaseAPI $api)
{
parent::__construct($api, "kit", "Get a pre-defined kit!", "[name] [player]", "[<name> <player>]", ["kits"]);
$this->setPermission("essentials.kit.use");
}
示例13: __construct
/**
* @param Loader $plugin
*/
public function __construct(Loader $plugin)
{
parent::__construct($plugin, "sethome", "Create or update a home position", "/sethome <name>", false, ["createhome"]);
$this->setPermission("essentials.sethome");
}
示例14: __construct
/**
* @param Loader $plugin
*/
public function __construct(Loader $plugin)
{
parent::__construct($plugin, "gamemode", "Change player gamemode", "/gamemode <mode> [player]", null, ["gm", "gma", "gmc", "gms", "gmt", "adventure", "creative", "survival", "spectator", "viewer"]);
$this->setPermission("essentials.gamemode");
}
示例15: __construct
/**
* @param Loader $plugin
*/
public function __construct(Loader $plugin)
{
parent::__construct($plugin, "powertool", "Toogle PowerTool on the item you're holding", "/powertool <command|c:chat macro> <arguments...>", false, ["pt"]);
$this->setPermission("essentials.powertool.use");
}