Now if you know proper php, you can do YourClassAPI::getInstance()->whatEverFunction() PHP: private static $instance;//instancepublic function onLoad(){self::$instance = $this;//your plugin class}public static function getInstance(){return self::$instance;//get class}
He wanted an api, "like on Economy" by @onebone . Like when you do EconomyAPI::getInstance()->addMoney("dot", 1);. The other way is $this->getServer()->getPluginManager()->getPlugin("YourPluginName")->whatEverFunction();
That's why I said he can get the plugin directly, I know it is much faster than static functions/methods. Either way, there are still ways to make an API.
If you are talking how to make a Developer API: Make everything that you do, everything that you fetch data through, everything that you execute, public functions. That's all. To create events, I think that thread already exists. See https://github.com/shoghicp/FastTransfer/tree/master/src/shoghicp/FastTransfer FastTransfer for example.