当前位置: 首页>>代码示例>>PHP>>正文


PHP BaseCommand::__construct方法代码示例

本文整理汇总了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);
 }
开发者ID:TBNRFrags2468,项目名称:EssentialsPE,代码行数:17,代码来源:BaseOverrideCommand.php

示例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");
 }
开发者ID:ZencraftYouTube,项目名称:EssentialsPE,代码行数:8,代码来源:Nuke.php

示例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");
 }
开发者ID:PrimusLV,项目名称:EssentialsPE,代码行数:8,代码来源:TPAHere.php

示例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");
 }
开发者ID:mwvent,项目名称:WattzEssentialsPE,代码行数:8,代码来源:Jump.php

示例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");
 }
开发者ID:TBNRFrags2468,项目名称:EssentialsPE,代码行数:8,代码来源:Heal.php

示例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");
 }
开发者ID:JungHyun3459,项目名称:EssentialsPE,代码行数:8,代码来源:Seen.php

示例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");
 }
开发者ID:TBNRFrags2468,项目名称:EssentialsPE,代码行数:8,代码来源:ClearInventory.php

示例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");
 }
开发者ID:TBNRFrags2468,项目名称:EssentialsPE,代码行数:8,代码来源:EssentialsPE.php

示例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");
 }
开发者ID:mwvent,项目名称:WattzEssentialsPE,代码行数:8,代码来源:Near.php

示例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");
 }
开发者ID:PrimusLV,项目名称:EssentialsPE,代码行数:8,代码来源:Jump.php

示例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");
 }
开发者ID:PrimusLV,项目名称:EssentialsPE,代码行数:8,代码来源:Top.php

示例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");
 }
开发者ID:PrimusLV,项目名称:EssentialsPE,代码行数:8,代码来源:Kit.php

示例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");
 }
开发者ID:mwvent,项目名称:WattzEssentialsPE,代码行数:8,代码来源:SetHome.php

示例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");
 }
开发者ID:Jackboy320,项目名称:EssentialsPE,代码行数:8,代码来源:Gamemode.php

示例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");
 }
开发者ID:mwvent,项目名称:WattzEssentialsPE,代码行数:8,代码来源:PowerTool.php


注:本文中的EssentialsPE\BaseFiles\BaseCommand::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。