Hooking
-
How to hook with IvanACF
Add the plugin into your dependencies.
If you use maven/gradle use this (works from version 1.6.0):
Maven:
HTML:<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
Add the plugin as a dependency into your plugin.yml:
Code (YAML):depend:
- IvanACF
Code (Java):@Override
public void onEnable(){
if(getServer().getPluginManager().getPlugin("IvanACF") != null){
IvanACF.registerHook(this);
getLogger().info("Hooked into IvanACF");
}else{
getLogger().warning("IvanACF cannot be found, disabling...");
getServer().getPluginManager().disablePlugin(this);
return;
}
// your code comes here
}
Here's output if everything's properly setuped right and the plugin's running without problems:
Thanks for using IvanACF ! - Loading...
- Loading...
XenCarta PRO
© Jason Axelrod from 8WAYRUN.COM