I'm trying to get this plugin working its HungerGames There's a error that I don't know how to fix could someone help? Here the repo https://github.com/MinecrafterPH/HungerGames And here's the error in the file Inspection result: Warning Warnings Server::getInstance() scanned in filesrc/HG/Main.php The PHP extensions that PocketMine-MP uses have some issues with static properties. You are recommended try using other methods to get the Serverinstance. You can use $this->getServer() to get the server object instead. PluginBase::$config is already defined in PocketMine PluginBase class. Strange errors will occur if you override $this->config yourself. For example, when you decide to use$this->saveDefaultConfig() later, it will not work. You are recommended to improve this by renaming $this->config to something else, or to use $this->saveDefaultConfig() and related functions. Syntax errors Inspection result: Error Errors PHP Parse error: syntax error, unexpected 'has' (T_STRING) in /var/www/tmp/5/HungerGames/src/HG/Main.php on line 208 Errors parsing /var/www/tmp/5/HungerGames/src/HG/Main.php Info
Change PHP: $sender->sendMessage(TextFormat::RED.".$player." has ".$deaths." deaths and ".$kills." kills."); to PHP: $sender->sendMessage(TextFormat::RED.$player." has ".$deaths." deaths and ".$kills." kills.");
Okay that's fixed but now I get this error Inspection result: Error Errors PHP Parse error: syntax error, unexpected 'break' (T_BREAK) in /var/www/tmp/5/HungerGames/src/HG/Main.php on line 623 Errors parsing /var/www/tmp/5/HungerGames/src/HG/Main.php Info
this "WAS" a plugin i was working on as you can see it is a fork i quit developing it publicly and made it neater and better
Okay so I fixed tons of other errors I pretty much figured it out but I get this when I load in server ARNING]: A plugin attempted to register a deprecated CallbackTask (Callback#HG\Main::gameTimber) [13:12:56] [NOTICE]: InvalidArgumentException: "Argument 1 passed to pocketmine\scheduler\CallbackTask::__construct() must be callable, array given, called in phar:///home/tcagame_svc1232/AJM/1232/plugins/hunger games.phar/src/HG/Main.php on line 55 and defined" (E_RECOVERABLE_ERROR) in "/src/pocketmine/scheduler/CallbackTask" at line 45 [13:12:56] [INFO]: Disabling HungerGames v1.2 And also I get error on line 142 when it points ->$pm to economy and pocketmoney plugin says there's a error on line 142 I'm to tired to do this right now hopefully someone figures it out while I'm gone