2022-01-06 18:05:33 +00:00
|
|
|
package com.alttd.altitudequests.config;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
2022-05-01 19:48:52 +00:00
|
|
|
import java.util.List;
|
2022-01-06 18:05:33 +00:00
|
|
|
|
|
|
|
|
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 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);
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-01 19:48:52 +00:00
|
|
|
public static String QUEST_BOOK_AUTHOR = "<magenta>Scruff</magenta>";
|
|
|
|
|
public static String QUEST_BOOK_TITLE = "<green>Quest Title</green>";
|
|
|
|
|
public static List<String> QUEST_PAGES = List.of("Example");
|
|
|
|
|
private static void loadBook() {
|
|
|
|
|
QUEST_BOOK_AUTHOR = config.getString("book.author", QUEST_BOOK_AUTHOR);
|
|
|
|
|
QUEST_BOOK_TITLE = config.getString("book.title", QUEST_BOOK_TITLE);
|
|
|
|
|
QUEST_PAGES = config.getStringList("book.pages", QUEST_PAGES);
|
2022-01-06 18:05:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void loadGUIText() {
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-01 19:48:52 +00:00
|
|
|
public static String NPC_NAME = "<light_purple>Scruff</light_purple>";
|
2022-01-06 18:05:33 +00:00
|
|
|
public static boolean DEBUG = false;
|
|
|
|
|
private static void loadSettings() {
|
2022-05-01 19:48:52 +00:00
|
|
|
NPC_NAME = config.getString("settings.npd-name", NPC_NAME);
|
2022-01-06 18:05:33 +00:00
|
|
|
DEBUG = config.getBoolean("settings.debug", DEBUG);
|
|
|
|
|
}
|
|
|
|
|
}
|