mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-02 22:16:00 +00:00
- Recode most classes - Add phases to battles - Pull updates from gradle-template-plugin
36 lines
843 B
Java
36 lines
843 B
Java
package com.github.alathra.alathranwars.commands;
|
|
|
|
import com.github.alathra.alathranwars.AlathranWars;
|
|
import dev.jorel.commandapi.CommandAPI;
|
|
import dev.jorel.commandapi.CommandAPIBukkitConfig;
|
|
|
|
public class CommandHandler {
|
|
private final AlathranWars plugin;
|
|
|
|
/**
|
|
* Instantiates the Command handler.
|
|
*
|
|
* @param plugin the plugin
|
|
*/
|
|
public CommandHandler(AlathranWars plugin) {
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
public void onLoad() {
|
|
CommandAPI.onLoad(new CommandAPIBukkitConfig(plugin).shouldHookPaperReload(true).silentLogs(true));
|
|
}
|
|
|
|
public void onEnable() {
|
|
CommandAPI.onEnable();
|
|
|
|
// Register commands
|
|
new WarCommands();
|
|
new SiegeCommands();
|
|
new AdminCommands();
|
|
}
|
|
|
|
public void onDisable() {
|
|
CommandAPI.onDisable();
|
|
}
|
|
}
|