-
Notifications
You must be signed in to change notification settings - Fork 0
Register extention
Mandress101 edited this page Feb 6, 2022
·
5 revisions
package net.testplugin.extention;
import it.mandress101.springcore.api.SpringCoreApi;
import it.mandress101.springcore.api.SpringCoreProvider;
public class ExampleClass extends JavaPlugin {
@Override
public void onEnable() {
if(Bukkit.getPluginManager().getPlugin("SpringCore") != null) {
//Register your extention on SpringCore plugin
SpringCoreApi coreApi = SpringCoreProvider.getApi();
coreApi.registerExtension(ExampleClass.class, false);
//Your code here
} else {
//Disable the plugin
}
}
@Override
public void onDisable() {
}
}The class that you pass in MUST be the MAIN CLASS of the extention plugin, this will be saved in the SpringCore database after the first start
plugin.yml:
name: <Your plugin name>
author: <Your name>
version: <Plugin version>
main: <main class package>
softdepend: [SpringCore]Put SpringCore as a dependency