Hi, I need help with the construction plugin. To console me writes error: Code: Notice: Trying to get property of non-object in /home/gamakk/GS/plugins/SurvivalGames/src/SurvivalGames/Config/SGConfig.php on line 28 [19:46:44] [Server thread/CRITICAL]: Error: "Cannot access parent:: when current class scope has no parent" (EXCEPTION) in "/SurvivalGames/src/SurvivalGames/Game/Arena/Arena" at line 29 SG\src\SG\Game\Arena\Arena: PHP: /** @var SurvivalGames */public $plugin;/** @var SGConfig */public $config;/*29*/ public function __construct(SurvivalGames $plugin) {/*30*/ $this->plugin = $plugin;/*31*/ $this->config = $this->plugin->loader->config;/*32*/ parent::__construct($plugin);} SG\src\SG\Config\SGConfig: PHP: /*28*/public function __construct(Loader $loader) {/*29*/ parent::__construct($loader);/*30*/ $this->loader = $loader;/*31*/ $this->arena = $this->loader->main->arena;} Thank you in advance .
You don't need to call the parent constructor (parent::__construct()) unless the parent has a constructor or you want to use the full functionality of the parent class (you wouldn't call the parent constructor from an abstract class, you'd do it from a class extending it).