예제 #1
0
 public function onEnable()
 {
     $this->CompanyDB = (new Config($this->getDataFolder() . "Company.json", Config::JSON))->getAll();
     if ($this->getServer()->getPluginManager()->getPlugin("EconomyAPI") == null) {
         $this->getLogger()->error($this->get("cant-find-economyapi"));
         $this->getServer()->getPluginManager()->disablePlugin($this);
     }
     $this->economy = EconomyAPI::getInstance();
     $this->Loadconfig();
     $this->getServer()->getPluginManager()->registerEvent($this, $this);
     $commandmap = $this->getServer()->getCommandMap();
     $command = new PluginCommand("회사", $this);
     $command->setDescription("회사를 개설합니다.");
     $command->setUsage("사용법 : /회사 생성 | 양도 | 목록 | 회사원추가 | 회사원목록 | 폐쇠");
     $command->setPermission("Company.command.allow");
     $command->register("회사", $command);
 }