__construct() public method

public __construct ( string $name, string $description = "", string $usageMessage = null, array $aliases = [] )
$name string
$description string
$usageMessage string
$aliases array
Beispiel #1
1
 public function __construct(EconomyAPI $plugin)
 {
     $desc = $plugin->getCommandMessage("seemoney");
     parent::__construct("seemoney", $desc["description"], $desc["usage"]);
     $this->setPermission("economyapi.command.seemoney");
     $this->plugin = $plugin;
 }
Beispiel #2
0
 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;
 }
 public function __construct(OneVsOne $plugin, ArenaManager $arenaManager)
 {
     parent::__construct($this->commandName, "Join 1vs1 queue !");
     $this->setUsage("/{$this->commandName}");
     $this->plugin = $plugin;
     $this->arenaManager = $arenaManager;
 }
 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.");
 }
 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.");
 }
 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;
 }
 /**
  * @param string $name
  * @param Plugin $owner
  */
 public function __construct($name, Plugin $owner)
 {
     parent::__construct($name);
     $this->owningPlugin = $owner;
     $this->executor = $owner;
     $this->usageMessage = "";
 }
 public function __construct(HungerGames $plugin, ArenaManager $arenaManager)
 {
     parent::__construct($this->commandName, "Add a spawn to an arena");
     $this->setUsage("/{$this->commandName}" . " [arena ID]");
     $this->plugin = $plugin;
     $this->arenaManager = $arenaManager;
 }
 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);
 }
Beispiel #10
0
 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;
 }
 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;
 }
 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");
 }
Beispiel #13
0
 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;
 }
 /**
  * @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;
 }
 /**
  * @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;
 }
 /**
  * @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;
 }
 public function __construct(EasyMessages $plugin)
 {
     parent::__construct("easymessages");
     $this->setDescription("Shows all the sub-commands for EasyMessages");
     $this->setUsage("/easymessages <sub-command> [parameters]");
     $this->setPermission("easymessages.command.easymessages");
     $this->setAliases(["em"]);
     $this->plugin = $plugin;
 }
 public function __construct(PlanB $plugin)
 {
     parent::__construct("planb");
     $this->setDescription("Shows all the sub-commands for PlanB");
     $this->setUsage("/planb <sub-command> [parameters]");
     $this->setPermission("planb.command.planb");
     $this->setAliases(["pb"]);
     $this->plugin = $plugin;
 }
 public function __construct(XEcon $main)
 {
     $a = $this->getAliases_();
     if (!is_array($a)) {
         $a = [$a];
     }
     parent::__construct($this->getName_(), $this->getDesc_(), $this->getUsage_(), $a);
     $this->main = $main;
 }
 public function __construct(SkinTools $plugin)
 {
     parent::__construct("skintools");
     $this->setDescription("Shows all the sub-commands for SkinTools");
     $this->setUsage("/skintools <sub-command> [parameters]");
     $this->setPermission("skintools.command.skintools");
     $this->setAliases(["st"]);
     $this->plugin = $plugin;
 }
 /**
  * @param RestartMe $plugin
  */
 public function __construct(RestartMe $plugin)
 {
     parent::__construct("restartme");
     $this->setDescription("Shows all the sub-commands for RestartMe");
     $this->setUsage("/restartme <sub-command> [parameters]");
     $this->setPermission("restartme.command.restartme");
     $this->setAliases(["rm"]);
     $this->plugin = $plugin;
 }
 /**
  * @param PHPUtils $plugin
  */
 public function __construct(PHPUtils $plugin)
 {
     parent::__construct("phputils");
     $this->setDescription("Shows all PHPUtils commands");
     $this->setUsage("/phputils <sub-command> [parameters]");
     $this->setPermission("phputils.command.phputils");
     $this->setAliases(["pu"]);
     $this->plugin = $plugin;
 }
 /**
  * @param DoMath $plugin
  */
 public function __construct(DoMath $plugin)
 {
     parent::__construct("domath");
     $this->setDescription("Shows all DoMath commands");
     $this->setUsage("/domath <sub-command> [parameters]");
     $this->setPermission("domath.command.domath");
     $this->setAliases(["dm"]);
     $this->plugin = $plugin;
 }
Beispiel #24
0
 /**
  * @param Main $plugin
  * @param $name
  * @param $description
  */
 public function __construct(Main $plugin, $name, $description, $aliases = [])
 {
     $this->plugin = $plugin;
     parent::__construct($name, $description);
     $this->setPermission("serverlove.command.love");
     foreach ($aliases as $aliase) {
         $this->setAliase($aliase);
     }
 }
 /**
  * @param MyTag $plugin
  */
 public function __construct(MyTag $plugin)
 {
     parent::__construct("mytag");
     $this->setDescription("Shows all the sub-commands for MyTag");
     $this->setUsage("/mytag <sub-command> [parameters]");
     $this->setPermission("mytag.command.mytag");
     $this->setAliases(["mt"]);
     $this->plugin = $plugin;
 }
 public function __construct(LegionPE $main, $name, callable $callback, callable $permCheck, $desc = "", $usage = null, $aliases = [])
 {
     $this->main = $main;
     if (is_string($aliases)) {
         $aliases = [$aliases];
     }
     parent::__construct($name, $desc, $usage, $aliases);
     $this->callback = $callback;
     $this->permCheck = $permCheck;
 }
 public function __construct(WorldEditArt $main)
 {
     $this->main = $main;
     $this->registerCmds();
     $aliases = [];
     foreach ($this->cmds as $cmd) {
         foreach ($cmd->getNames() as $name) {
             $aliases[] = "/" . strtolower($name);
         }
     }
     parent::__construct("/", "WorldEditArt main command.", "Use `//` for detailed help.", $aliases);
     $main->getServer()->getCommandMap()->register("/", $this);
 }
Beispiel #28
0
 public function __construct(EconomyProperty $plugin, $command = "property", $pos1 = "pos1", $pos2 = "pos2", $make = "make", $touchPos = "touchpos")
 {
     parent::__construct($command, $plugin);
     $this->setUsage("/{$command} <{$pos1}|{$pos2}|{$make}> [price]");
     $this->setPermission("economyproperty.command.property");
     $this->setDescription("Property manage command");
     $this->plugin = $plugin;
     $this->command = $command;
     $this->pos1 = $pos1;
     $this->pos2 = $pos2;
     $this->make = $make;
     $this->touchPos = $touchPos;
     $this->pos = array();
 }
Beispiel #29
0
 public function __construct(Main $tntRun)
 {
     parent::__construct("tntrun", "TNTRun main command", "/tntrun cmds", ["tr"]);
     $this->tntRun = $tntRun;
     $this->setPermission("tntrun.command");
     foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->getPlugin()->getSubCommands())) as $obj) {
         /** @var \SplFileObject $obj */
         if ($obj->getExtension() !== "php") {
             continue;
         }
         $class = $obj->getBasename(".php");
         //rimuove estensione .php
         $className = "\\" . __NAMESPACE__ . "\\sub\\" . $class;
         $this->subCommands[strtolower(substr($class, 0, -6))] = new $className($this->tntRun);
     }
 }
 public function __construct(Main $plugin)
 {
     parent::__construct("help", "Gives you help", null, ["?"]);
     $this->plugin = $plugin;
     $this->setPermission("mhelpmodifer.command.help");
     $commands = $this->plugin->getConfig()->get('content');
     if (!$commands) {
         $plugin->getLogger()->warning("Failed to load help messages.");
         return;
     }
     $iperPage = 5;
     $page = 1;
     $cmds = [];
     $i = 1;
     foreach ($commands as $k => $cmd) {
         $cmds[$page][] = $cmd;
         if ($i >= $iperPage) {
             $i = 1;
             $page++;
         }
         $i++;
     }
     $this->book = $cmds;
 }