diff --git a/CustomAlerts/src/CustomAlerts/CustomAlerts.php b/CustomAlerts/src/CustomAlerts/CustomAlerts.php index ecb460e..d230881 100755 --- a/CustomAlerts/src/CustomAlerts/CustomAlerts.php +++ b/CustomAlerts/src/CustomAlerts/CustomAlerts.php @@ -51,8 +51,7 @@ public function onEnable():void{ @mkdir($this->getDataFolder()); $this->saveDefaultConfig(); $this->cfg = $this->getConfig()->getAll(); - $tf = new PluginCommand("customalerts", $this, $this); - $tf->setExecutor(new Commands($this)); + $this->getServer()->getCommandMap()->register("customalerts", new Commands($this)); $this->getServer()->getPluginManager()->registerEvents(new EventListener($this), $this); $this->getScheduler()->scheduleRepeatingTask(new MotdTask($this), 20); }