API

Description

The API is available by importing OverPermissions as a project and then hooking into the .getAPI() method.

Example

OverPermissionsAPI overPerms = null;

public void onEnable( ) {
  Plugin plugin = null;
  if((plugin = Bukkit.getPlugin("OverPermissions")) != null && (plugin instanceof OverPermissions)) {
    overPerms = ((OverPermissions)plugin).getAPI();
  } else {
    //The OverPermissions plugin doesn't exist, make sure to deal with this or throw an exception if it was required.
  }
}

Make sure to also append this line in your plugin.yml:

softdepend: [OverPermissions]

Further reading


Comments

Posts Quoted:
Reply
Clear All Quotes