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> " ;
2022-06-02 20:12:29 +00:00
public static List < String > QUEST_PAGES = List . of ( """
< bold > < gold > Hey < player > < / gold > < / bold >
Here is a quick summary of your quest progress so far !
* Quest : < quest >
* Variant : < variant >
* Items obtained : < step_1_progress > / < step_1_total >
* Items turned in : < step_2_progress > / < step_2_total >
< click : run_command : / aquest turnin > < gold > Click here to turn in more items < / gold > < / click >
" " " );
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-06-01 17:33:02 +00:00
public static String TOO_FAR_FROM_NPC = " <red>You are too far from Scruff " ; //TODO replace scruff with <npc>?
public static String DAILY_ALREADY_DONE = " <red>You already completed your daily quest " ;
2022-06-02 20:12:29 +00:00
public static String RESETTING_QUESTS = " <white>[<gold>Mascot</gold>] <light_purple>Scruff</light_purple><gray>:</gray> <green>Thank you everyone that completed their daily quest! I will be handing out new ones now so come visit me at <gold>/spawn</gold>!</green></white> " ;
2022-06-01 17:33:02 +00:00
private static void loadMessages ( ) {
TOO_FAR_FROM_NPC = config . getString ( " messages.too-far-from-npc " , TOO_FAR_FROM_NPC ) ;
DAILY_ALREADY_DONE = config . getString ( " messages.daily-already-done " , DAILY_ALREADY_DONE ) ;
2022-06-02 20:12:29 +00:00
RESETTING_QUESTS = config . getString ( " messages.resetting-quests " , RESETTING_QUESTS ) ;
2022-06-01 17:33:02 +00:00
}
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 ) ;
}
}