Tutorial

Ok, so first you need to add this to your plugin library. They I recommend adding it into your plugin in this way: Depend in in your plugin.yml using this:

depend: [BeginnerAPI]

Add this at the beginning of your class:

BeginnerAPI bAPI;

Then add this in your onEnable():

bAPI = (BeginnerAPI)Bukkit.getServer().getPluginManager().getPlugin("BeginnerAPI");

If you wish your plugin to disable if BeginnerAPI is not found, add this in your onEnable():

if (Bukkit.getServer().getPluginManager().getPlugin("BeginnerAPI") == null){
Bukkit.getServer().getPluginManager().disablePlugin(this);
}

If you added BeginnerAPI to your plugin in this method, you can access the things it can do with using bAPI.[the thing(for example healPlayer(Player))]. Things that you can do with BeginnerAPI


Comments

Posts Quoted:
Reply
Clear All Quotes