2021-09-24 23:56:42 +00:00
|
|
|
package com.alttd;
|
|
|
|
|
|
|
|
|
|
import com.alttd.GUI.GUIListener;
|
|
|
|
|
import com.alttd.commands.CommandManager;
|
2021-11-03 13:35:53 +00:00
|
|
|
import com.alttd.commands.database.Database;
|
2021-09-24 23:56:42 +00:00
|
|
|
import com.alttd.config.Config;
|
|
|
|
|
import com.alttd.config.VillagerConfig;
|
|
|
|
|
import com.alttd.config.WorthConfig;
|
|
|
|
|
import com.alttd.events.VillagerInteract;
|
2021-11-03 15:54:12 +00:00
|
|
|
import com.alttd.util.Logger;
|
2021-09-24 23:56:42 +00:00
|
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
|
|
|
|
|
|
|
|
public class VillagerUI extends JavaPlugin {
|
|
|
|
|
|
|
|
|
|
public static VillagerUI instance;
|
|
|
|
|
|
|
|
|
|
public static VillagerUI getInstance() {
|
|
|
|
|
return instance;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onLoad() {
|
|
|
|
|
instance = this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onEnable() {
|
|
|
|
|
registerEvents();
|
|
|
|
|
new CommandManager();
|
|
|
|
|
Config.reload();
|
|
|
|
|
VillagerConfig.reload();
|
|
|
|
|
WorthConfig.reload();
|
2021-11-03 13:35:53 +00:00
|
|
|
Database.init();
|
2021-11-03 15:54:12 +00:00
|
|
|
Logger.info("--------------------------------------------------");
|
|
|
|
|
Logger.info("Villager UI started");
|
|
|
|
|
Logger.info("--------------------------------------------------");
|
2021-09-24 23:56:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void registerEvents() {
|
|
|
|
|
getServer().getPluginManager().registerEvents(new GUIListener(), this);
|
|
|
|
|
getServer().getPluginManager().registerEvents(new VillagerInteract(), this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|