-
Notifications
You must be signed in to change notification settings - Fork 9
Hooking into Caliburn
Caliburn can be fetched from the Maven repository. The direct link for a jar download is
http://erethon.de/repo/de/erethon/caliburn/{version}/caliburn-{version}.jar
Depending on your needs, it may be appropriate to either implement Caliburn in your own plugin or two make use of an existing implementation.
This can easily be done by creating a new instance of de.erethon.caliburn.CaliburnAPI.
The static getter de.erethon.caliburn.CaliburnAPI.getInstance() always returns
private CaliburnAPI caliburn;
@Override
public void onEnable() {
caliburn = CaliburnAPI.getInstance() == null ? new CaliburnAPI(this) : CaliburnAPI.getInstance();
}
ItemsXL is an official, slim implementation of CaliburnAPI as a plugin. That being said, you do not need to shade Caliburn if you run ItemsXL on your server. Just make sure to add it as a hard dependency to your plugin.yml.
depend: [ItemsXL]
ItemsXL handles the initialization of the API, so the static getter de.erethon.caliburn.CaliburnAPI.getInstance() can safely be used.
Wiki: © 2016-2020 Daniel Saukel and contributors, licensed under CC BY-SA