-
Notifications
You must be signed in to change notification settings - Fork 16
Marcin Wieczorek edited this page Apr 22, 2017
·
5 revisions
To use our API you have to import NovaGuilds.jar to your project.
For Eclipse: Add External Libraries
For Intellij: Project Structure → Libraries
You will also need to add dependency for NovaGuilds in your plugin.yml
depend: [NovaGuilds]
public NovaGuilds getNovaGuilds() {
Plugin plugin = getServer().getPluginManager().getPlugin("NovaGuilds");
if (plugin == null || !(plugin instanceof NovaGuilds)) {
return null;
}
return (NovaGuilds) plugin;
}
You can also use:
NovaGuilds.getInstance()
You can check if a player can build at specified location. This checks his guild and bypass mode.
NovaGuilds novaGuilds = getNovaGuilds();
boolean canbuild = novaGuilds.getRegionManager().canBuild(Player, Location);