/** * On loading the plugin * @return type */ public function onLoad() { $this->getLogger()->info("Loading ..."); Config::init("HealingSpot\\Config.json"); $this->getServer()->getCommandMap()->register("hs", new MainCommand("hs")); Subcommands::register("item", new ItemSubcommand()); $this->getLogger()->info("is now loaded"); }
public function execute(CommandSender $sender, $commandLabel, array $args) { if (count($args) == 0) { return false; } else { $subcommand = $args[0]; $arguments = $args; array_shift($arguments); Subcommands::execute($subcommand, $sender, $arguments); } }