For example how can a call the simpleauth API (example of code) in 1.4 ==> bool isPlayerAuthenticated(pocketmine\Player $player) With 1.3, i was using a static class Bag_zoneAPI and i was calling it like this : $zone = Bag_zoneAPI::getZoneByAlias($args[0]); Is there a better way to do it in 1.4 ?
*cringes* PHP: $simpleAuthObject = $this->getServer()->getPluginManager()->getPlugin("SimpleAuth"); Be sure to check that it is correct and is not disabled. Also, add it to the dependencies if you NEED it, or to soft dependencies, if you CAN use it. That way pocketmine-mp will load it before your plugin
Then why can't I getPlugin() myself in my own plugin? While that function will only be called when the plugin is enabled?
no... -_- https://github.com/PocketMine/ExamplePlugin https://github.com/PocketMine/SimpleAuth/blob/master/src/SimpleAuth/SimpleAuth.php
xpyctum there is nothing on that plugins because thay don't need any depedencies... with bukkit i can add dependencies into the plugin.yml something like that ? softdepend: [ pluginname ] i don't know how to do it with the 1.4 api :/ and where to find a response...
thx PEMapModder and for dependencies ? (not soft) ? Generally, do you have a documentation with all the parameters allowed into plugin.yml ? (i'm looking for aliases too for command too)