From 192499879acd00d70c9077e5480d721728f6a168 Mon Sep 17 00:00:00 2001 From: KanekiLeChomeur <52374013+KanekiLeChomeur@users.noreply.github.com> Date: Mon, 13 Jun 2022 21:18:46 +0200 Subject: [PATCH] Command Registering change --- CustomAlerts/src/CustomAlerts/CustomAlerts.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); }