當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Command::__construct方法代碼示例

本文整理匯總了PHP中pocketmine\command\Command::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Command::__construct方法的具體用法?PHP Command::__construct怎麽用?PHP Command::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pocketmine\command\Command的用法示例。


在下文中一共展示了Command::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct(EconomyAPI $plugin)
 {
     $desc = $plugin->getCommandMessage("seemoney");
     parent::__construct("seemoney", $desc["description"], $desc["usage"]);
     $this->setPermission("economyapi.command.seemoney");
     $this->plugin = $plugin;
 }
開發者ID:dog194,項目名稱:EconomyS,代碼行數:7,代碼來源:SeeMoneyCommand.php

示例2: __construct

 public function __construct(Main $luckyBlock, &$setup, &$data)
 {
     parent::__construct("luckyblock", "LuckyBlock is an plugin that allows you to create LuckyBlock!", "/lucky <command> <value>", ["luckyblock", "lucky", "lb"]);
     $this->luckyBlock = $luckyBlock;
     $this->data = $data;
     $this->setup = $setup;
 }
開發者ID:xionbig,項目名稱:LuckyBlock,代碼行數:7,代碼來源:Commands.php

示例3: __construct

 public function __construct(OneVsOne $plugin, ArenaManager $arenaManager)
 {
     parent::__construct($this->commandName, "Join 1vs1 queue !");
     $this->setUsage("/{$this->commandName}");
     $this->plugin = $plugin;
     $this->arenaManager = $arenaManager;
 }
開發者ID:applqpak,項目名稱:pocketmine-1vs1-plugin,代碼行數:7,代碼來源:JoinCommand.php

示例4: __construct

 public function __construct(LagFixer $main)
 {
     $this->plugin = $main;
     parent::__construct("realhealth", "Sends you your real health", null, ["rh", "rlhlth"]);
     $this->setPermission("lagfixer.realhealth");
     $this->setPermissionMessage("Hmm, seems that you haven't been granted permission to view your real health.");
 }
開發者ID:barnseyminesuk,項目名稱:Small-ZC-Plugins,代碼行數:7,代碼來源:HealthCommand.php

示例5: __construct

 public function __construct(LagFixer $main)
 {
     $this->plugin = $main;
     parent::__construct("show", "Force show a player(s) if they are not supposed to be invisible", "<player|-all>");
     $this->setPermission("lagfixer.show");
     $this->setPermissionMessage("Seems that someone took away your permission to show invisible players.");
 }
開發者ID:barnseyminesuk,項目名稱:Small-ZC-Plugins,代碼行數:7,代碼來源:ShowCommand.php

示例6: __construct

 public function __construct(HungerGames $plugin, ArenaManager $arenaManager)
 {
     parent::__construct($this->commandName, "Set a resettable chest");
     $this->setUsage("/{$this->commandName}" . " [arena number]");
     $this->plugin = $plugin;
     $this->arenaManager = $arenaManager;
 }
開發者ID:TuffDev,項目名稱:HungerGames,代碼行數:7,代碼來源:ChestPlaceCommand.php

示例7: __construct

 /**
  * @param string $name
  * @param Plugin $owner
  */
 public function __construct($name, Plugin $owner)
 {
     parent::__construct($name);
     $this->owningPlugin = $owner;
     $this->executor = $owner;
     $this->usageMessage = "";
 }
開發者ID:Edwardthedog2,項目名稱:Steadfast2,代碼行數:11,代碼來源:PluginCommand.php

示例8: __construct

 public function __construct(DynamicHub $hub, string $name, string $gameName, array $aliases)
 {
     parent::__construct($name, "Join {$gameName}", "/{$name}", $aliases);
     $this->hub = $hub;
     $this->gameName = $gameName;
     $hub->getServer()->getCommandMap()->register("join", $this);
 }
開發者ID:gitter-badger,項目名稱:DynamicHub,代碼行數:7,代碼來源:JoinGameCommand.php

示例9: __construct

 public function __construct(HungerGames $plugin, ArenaManager $arenaManager)
 {
     parent::__construct($this->commandName, "Create a new arena");
     $this->setUsage("/{$this->commandName}" . " [id] [capacity]");
     $this->command = $this->commandName;
     $this->plugin = $plugin;
     $this->arenaManager = $arenaManager;
 }
開發者ID:TuffDev,項目名稱:HungerGames,代碼行數:8,代碼來源:AddArenaCommand.php

示例10: __construct

 public function __construct(OneVsOne $plugin, ArenaManager $arenaManager)
 {
     parent::__construct($this->commandName, "Reference a new arena");
     $this->setUsage("/{$this->commandName}");
     $this->command = $this->commandName;
     $this->plugin = $plugin;
     $this->arenaManager = $arenaManager;
 }
開發者ID:TDMGamingMC,項目名稱:pocketmine-1vs1-plugin,代碼行數:8,代碼來源:ReferenceArenaCommand.php

示例11: __construct

 public function __construct(WorldEditArt $main)
 {
     if (Utils::getOS() !== "win") {
         throw new \RuntimeException("//wea-config is only for Windows.");
     }
     $this->main = $main;
     parent::__construct("/wea-config", "Start WorldEditArt installer(will stop the server)", "/wea-config");
 }
開發者ID:WonderlandPE,項目名稱:WorldEditArt,代碼行數:8,代碼來源:StartConfigurationCommand.php

示例12: __construct

 public function __construct(HungerGames $plugin, ArenaManager $arenaManager)
 {
     parent::__construct($this->commandName, "Create the lobby spawn");
     $this->setUsage("/{$this->commandName}");
     $this->command = $this->commandName;
     $this->plugin = $plugin;
     $this->arenaManager = $arenaManager;
 }
開發者ID:TuffDev,項目名稱:HungerGames,代碼行數:8,代碼來源:AddLobbyCommand.php

示例13: __construct

 /**
  * @param QueryFacade $plugin
  */
 public function __construct(QueryFacade $plugin)
 {
     parent::__construct("queryfacade");
     $this->setDescription("Shows all the sub-commands for QueryFacade");
     $this->setUsage("/queryfacade <sub-commands> [parameters]");
     $this->setPermission("queryfacade.command.queryfacade");
     $this->setAliases(["qf"]);
     $this->plugin = $plugin;
 }
開發者ID:Evarettedavis,項目名稱:PocketMine-Plugins,代碼行數:12,代碼來源:QueryFacadeCommand.php

示例14: __construct

 /**
  * @param iManager $plugin
  */
 public function __construct(iManager $plugin)
 {
     parent::__construct("imanager");
     $this->setDescription("Shows all the sub-commands for iManager");
     $this->setUsage("/imanager <sub-command> [parameters]");
     $this->setPermission("imanager.command.imanager");
     $this->setAliases(["im"]);
     $this->plugin = $plugin;
 }
開發者ID:Evarettedavis,項目名稱:PocketMine-Plugins,代碼行數:12,代碼來源:iManagerCommand.php

示例15: __construct

 /**
  * @param RapidCMD $plugin
  */
 public function __construct(RapidCMD $plugin)
 {
     parent::__construct("rapidcmd");
     $this->setDescription("Shows all RapidCMD commands");
     $this->setUsage("/rapidcmd <sub-command> [parameters]");
     $this->setPermission("rapidcmd.command.rapidcmd");
     $this->setAliases(["rc"]);
     $this->plugin = $plugin;
 }
開發者ID:Artide,項目名稱:PocketMine-Plugins,代碼行數:12,代碼來源:RapidCMDCommand.php


注:本文中的pocketmine\command\Command::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。