I just used some plugins that already working in old api for new server pmmp with api 3.0.0-ALPHA and now these plugin got same error : Code: Error: "Call to undefined method pocketmine\Server::getScheduler()" (EXCEPTION) in "PocketRPG_v0.3.0/src/PocketRPG/Main" at line 37 Code of line with error : PHP: public function onEnable() { $this->getLogger()->info(TF:: GREEN . "Enabling PocketRPG"); $this->getServer()->getPluginManager()->registerEvents(new EventListener($this), $this); $this->getCommand("rpg")->setExecutor(new RpgCommands($this)); $this->getCommand("quest")->setExecutor(new QuestCommands($this)); $this->getCommand("party")->setExecutor(new PartyCommands($this)); /*line 37 */ $this->getServer()->getScheduler()->scheduleRepeatingTask (new ManaTask($this), 40); @mkdir($this->getDataFolder()); $this->saveResource("config.yml"); $this->config = new Config($this->getDataFolder(). "config.yml", Config::YAML); } Please help me how to fix@@@
Consequences of using unstable PMMP releases without going through the changes? https://github.com/pmmp/PocketMine-MP/pull/2213
don't use development builds if you don't know what you're doing... wonders if he ought to add a kill switch to dev builds to stop noobs running them
I fixed but now i have another error Code: Error: "Cannot call constructor" (EXCEPTION) in "PocketRPG_v0.3.0/src/PocketRPG/tasks/ManaTask" at line 16 PHP: use PocketRPG\Main;use pocketmine\scheduler\Task;use pocketmine\scheduler\TaskScheduler;use pocketmine\scheduler\TaskHandler;use pocketmine\Player;use pocketmine\Server;use pocketmine\utils\Config;class ManaTask extends Task { public function __construct(Main $plugin) { /*line16*/ parent::__construct ($plugin); $this->plugin = $plugin; }
Task class has no constructor, you're trying to call Task class's constructor on that line. https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/scheduler/Task.php