- Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathExamplePlugin.java
More file actions
Latest commit
42 lines (39 loc) · 1.78 KB
/
Copy pathExamplePlugin.java
File metadata and controls
42 lines (39 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
packageorg.example;
importcom.zenith.plugin.api.Plugin;
importcom.zenith.plugin.api.PluginAPI;
importcom.zenith.plugin.api.ZenithProxyPlugin;
importnet.kyori.adventure.text.logger.slf4j.ComponentLogger;
importorg.example.command.ExampleCommand;
importorg.example.command.ExampleESPCommand;
importorg.example.command.ExampleWanderCommand;
importorg.example.module.ExampleESPModule;
importorg.example.module.ExampleModule;
importorg.example.module.ExampleWanderModule;
@Plugin(
id = BuildConstants.PLUGIN_ID,
version = BuildConstants.VERSION,
description = "ZenithProxy Example Plugin",
url = "https://github.com/rfresh2/ZenithProxyExamplePlugin",
authors = {"rfresh2"},
mcVersions = {BuildConstants.MC_VERSION} // to indicate any MC version: @Plugin(mcVersions = "*")
)
publicclassExamplePluginimplementsZenithProxyPlugin {
// public static for simple access from modules and commands
// or alternatively, you could pass these around in constructors
publicstaticExampleConfigPLUGIN_CONFIG;
publicstaticComponentLoggerLOG;
@Override
publicvoidonLoad(PluginAPIpluginAPI) {
LOG = pluginAPI.getLogger();
LOG.info("Example Plugin loading...");
// initialize any configurations before modules or commands might need to read them
PLUGIN_CONFIG = pluginAPI.registerConfig(BuildConstants.PLUGIN_ID, ExampleConfig.class);
pluginAPI.registerModule(newExampleModule());
pluginAPI.registerModule(newExampleESPModule());
pluginAPI.registerModule(newExampleWanderModule());
pluginAPI.registerCommand(newExampleCommand());
pluginAPI.registerCommand(newExampleESPCommand());
pluginAPI.registerCommand(newExampleWanderCommand());
LOG.info("Example Plugin loaded!");
}
}