API
API
For using Skyoconomy with your plugin, create a new variable :
public static Skyoconomy skyoconomy = null;
And add this method to your onEnable() :
public boolean loadEconomy() { if(this.getServer().getPluginManager().getPlugin("Skyoconomy") != null) { skyoconomy = EconomyPlugin.economy; return true; } else { return false; } }
It make something like :
public void onEnable() { if(loadEconomy()) { System.out.println("Skyoconomy has been loaded and initialized with success !"); } else { this.getServer().getPluginManager().disablePlugins(); } }
Are you ready ? Check the JavaDoc here !
You can also check the source code of the add-ons.
Comments