DaPigGuy / PiggyFactions

A modern open source factions plugin for PocketMine-MP
https://rtdx.aericio.net/en/latest/plugins/piggyfactions/
Apache License 2.0
52 stars 30 forks source link

Plugin API is not working onEnable #76

Closed dadodasyra closed 4 years ago

dadodasyra commented 4 years ago

Please make sure your issue complies with these guidelines:

Issue Description

Steps to Reproduce the Issue

  1. Get plugin in another plugin like this :

/** @var PiggyFactions $pigfaction */ $pigfaction = $this->getServer()->getPluginManager()->getPlugin("PiggyFactions"); $this->faction = $pigfaction->getFactionsManager(); $this->claims = $pigfaction->getClaimsManager();

  1. As soon as php reads $pigfaction->getFactionsManager() There will be an error on the console. The error: [19:15:45] [Server thread/CRITICAL]: TypeError: "Return value of DaPigGuy\PiggyFactions\PiggyFactions::getFactionsManager() must be an instance of DaPigGuy\PiggyFactions\factions\FactionsManager, null returned" (EXCEPTION) in "plugins/PiggyFactions/src/DaPigGuy/PiggyFactions/PiggyFactions" at line 179

OS and Versions

Extra Information

This is a bug, but it is surely not caused by the plugin itself but the way pocketmine works. I don't know if there is anything you can do about it.

Aericio commented 4 years ago

Try latest dev build from Poggit-CI