Skip to content

Commit

Permalink
init config first
Browse files Browse the repository at this point in the history
  • Loading branch information
cubewhy committed Jan 7, 2024
1 parent 21f9b46 commit 11fa4df
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/org/cubewhy/celestial/Celestial.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ public static void main(String[] args) throws Exception {


private static void run(String[] args) throws Exception {
initTheme(); // init theme
// init config
initConfig();
initTheme(); // init theme

OptionParser optionParser = new OptionParser();
optionParser.accepts("help", "Print help and exit")
Expand Down Expand Up @@ -278,8 +278,7 @@ private static File getMinecraftFolder() {
}

public static void initTheme() throws IOException {
JsonElement theme = config.getValue("theme");
String themeType = (theme.isJsonNull()) ? "dark" : theme.getAsString();
String themeType = config.getValue("theme").getAsString();
log.info("Set theme -> " + themeType);
switch (themeType) {
case "dark" -> {
Expand Down

0 comments on commit 11fa4df

Please sign in to comment.