コード例 #1
0
ファイル: HealingSpot.php プロジェクト: Vavaballz/HealingSpot
 /**
  * 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");
 }
コード例 #2
0
ファイル: MainCommand.php プロジェクト: Vavaballz/HealingSpot
 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);
     }
 }