56 lines
1.3 KiB
Java
56 lines
1.3 KiB
Java
package com.alttd.hunger_games;
|
|
|
|
import com.alttd.hunger_games.commands.BaseCommand;
|
|
import com.alttd.hunger_games.config.Config;
|
|
import com.alttd.hunger_games.config.Messages;
|
|
import com.alttd.hunger_games.services.Round;
|
|
import com.alttd.hunger_games.services.RoundService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.bukkit.plugin.PluginManager;
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
|
|
@Slf4j
|
|
public final class Main extends JavaPlugin {
|
|
|
|
private BaseCommand command;
|
|
private Round round;
|
|
private RoundService roundService;
|
|
|
|
@Override
|
|
public void onEnable() {
|
|
log.info("Starting HungerGames");
|
|
reloadConfigs();
|
|
registerServices();
|
|
registerCommands();
|
|
registerEvents();
|
|
registerSchedulers();
|
|
}
|
|
|
|
private void registerServices() {
|
|
round = Round.createSingletonInstance();
|
|
roundService = new RoundService(round);
|
|
}
|
|
|
|
@Override
|
|
public void onDisable() {
|
|
log.info("Disabling HungerGames");
|
|
}
|
|
|
|
private void registerCommands() {
|
|
command = new BaseCommand(this, roundService);
|
|
}
|
|
|
|
private void registerEvents() {
|
|
PluginManager pluginManager = getServer().getPluginManager();
|
|
}
|
|
|
|
public void reloadConfigs() {
|
|
Config.reload();
|
|
Messages.reload();
|
|
}
|
|
|
|
private void registerSchedulers() {
|
|
|
|
}
|
|
}
|