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);
|
|
|
|
|
}
|
|
|
|
|
|
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>";
|
2022-06-02 20:12:29 +00:00
|
|
|
public static List<String> QUEST_PAGES = List.of("""
|
|
|
|
|
<bold><gold>Hey <player></gold></bold>
|
|
|
|
|
|
2022-06-02 23:06:24 +00:00
|
|
|
Active quest summary:
|
2022-06-02 20:12:29 +00:00
|
|
|
* Quest: <quest>
|
2022-06-02 23:06:24 +00:00
|
|
|
* Type: <variant>
|
|
|
|
|
* <step_1>: <step_1_progress>/<step_1_total>
|
|
|
|
|
* <step_2>: <step_2_progress>/<step_2_total>
|
2022-06-02 20:12:29 +00:00
|
|
|
|
2022-06-02 23:06:24 +00:00
|
|
|
<click:run_command:/aquest turnin><turn_in_text></click>
|
2022-06-02 20:12:29 +00:00
|
|
|
""");
|
2022-05-01 19:48:52 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
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-06-02 22:34:02 +00:00
|
|
|
NPC_NAME = config.getString("settings.npc-name", NPC_NAME);
|
2022-01-06 18:05:33 +00:00
|
|
|
DEBUG = config.getBoolean("settings.debug", DEBUG);
|
|
|
|
|
}
|
|
|
|
|
}
|