Using the Guilds API
- Add
Guildsas soft/hard dependency in yourplugin.yml:
plugin.yml
softdepend: [Guilds]
# or
depend: [Guilds]
- Check if the plugin is enabled on the server:
(You don't need to do this if you addedGuildsas hard dependency)
ExamplePlugin.java
@Override
public void onEnable() {
if (!getServer().getPluginManager().isPluginEnabled("Guilds")) {
getLogger().severe("Guilds not found! Disabling...");
getServer().getPluginManager().disablePlugin(this);
return;
}
// Other Code
}