AltitudeQuests/src/main/java/com/alttd/altitudequests/config/Config.java

52 lines
1.8 KiB
Java
Raw Normal View History

2022-01-06 18:05:33 +00:00
package com.alttd.altitudequests.config;
import java.io.File;
public final class Config extends AbstractConfig {
static Config config;
static int version;
public Config() {
super(new File(System.getProperty("user.home") + File.separator + "share" + File.separator + "configs" + File.separator + "AltitudeQuests"), "config.yml");
}
public static void reload() {
config = new Config();
version = config.getInt("config-version", 1);
config.set("config-version", 1);
config.readConfig(Config.class, null);
}
public static String HELP_MESSAGE_WRAPPER = "<gold>AltitudeQuests help:\n<commands></gold>";
public static String HELP_MESSAGE = "<green>Show this menu: <gold>/aquest help</gold></green>";
public static String RELOAD_HELP_MESSAGE = "<green>Reload configs: <gold>/aquest reload</gold></green>";
private static void loadHelp() {
HELP_MESSAGE_WRAPPER = config.getString("help.help-wrapper", HELP_MESSAGE_WRAPPER);
HELP_MESSAGE = config.getString("help.help", HELP_MESSAGE);
RELOAD_HELP_MESSAGE = config.getString("help.reload", RELOAD_HELP_MESSAGE);
}
public static String NO_PERMISSION = "<red>You do not have permission to do that.</red>";
public static String NO_CONSOLE = "<red>You cannot use this command from console.</red>";
private static void loadGeneric() {
NO_PERMISSION = config.getString("generic.no-permission", NO_PERMISSION);
NO_CONSOLE = config.getString("generic.no-console", NO_CONSOLE);
}
private static void loadMessages() {
}
private static void loadGUIText() {
}
public static boolean DEBUG = false;
private static void loadSettings() {
DEBUG = config.getBoolean("settings.debug", DEBUG);
}
}