1.x/API
From Citizens Wiki
< 1.x
JavaDocs
Our API documentation can be found here. For a basic guide on hooking into Citizens, see below.
Using the Citizens API
Hooking into Citizens is the same as hooking into any other Bukkit plugin like PermissionsBukkit or iConomy. Add the latest version of Citizens.jar to your build path. Then, add this code to your onEnable in the main class:
public boolean citizensEnabled = false; public void onEnable() { Plugin test = server.getPluginManager().getPlugin("Citizens"); if (test != null) { citizensEnabled = true; System.out.println("Successfully hooked into Citizens!"); } else { System.out.println("Citizens isn't loaded."); }
To utilize this class, add the following import to your code:
import net.citizensnpcs.api.CitizensManager