[18:55:02] [Server thread/CRITICAL]: ErrorException: "Undefined index: Commands" (EXCEPTION) in "plugins/SEXDCore_SB/src/xinghao2003/SEXDCore/Main" at line 44 public function onEnable() : void{ $this->getServer()->getPluginManager()->registerEvents($this, $this); ############################# $this->saveDefaultConfig(); $c = $this->getConfig()->getAll(); foreach ($c["Commands"] as $i) { <== here error $this->getScheduler()->scheduleRepeatingTask(new TimeCommand($this, $i["Command"]), $i["Time"] * 1200); ############################# $this->saveItems(); ############################# $this->g1 = new Config($this->getDataFolder()."1.yml",Config::YAML,[]); $this->g2 = new Config($this->getDataFolder()."2.yml",Config::YAML,[]); $this->g3 = new Config($this->getDataFolder()."3.yml",Config::YAML,[]); $this->g4 = new Config($this->getDataFolder()."4.yml",Config::YAML,[]); ############################# $this->saveResource("serverui.json"); $this->conf = new Config($this->getDataFolder()."prefix.yml",Config::YAML,[]); ############################# $this->getLogger()->info("SEXDCore Enable"); }
we cant help you if you dont give us complete source i think you didnt check if commands index is set in config