Skip to content

Commit

Permalink
Rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
voruti committed Jul 22, 2023
1 parent 6cd2b58 commit f309d64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class Config {

public static final String FILE_NAME = "config.json";

public static final Config DEFAULT_CONFIG = new ConfigBuilder()
public static final Config DEFAULT = new ConfigBuilder()
.serverListEntryFormat("%1$s")
.maxListEntries(16)
.replaceOnlinePlayerCount(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public Config loadConfig() {

final Path configPath = dataDirectory.resolve(Config.FILE_NAME);
if (!Files.exists(configPath)) {
this.writeFile(configPath, Config.DEFAULT_CONFIG);
return Config.DEFAULT_CONFIG;
this.writeFile(configPath, Config.DEFAULT);
return Config.DEFAULT;
}
if (!Files.isRegularFile(configPath) || !Files.isReadable(configPath)) {
throw new IllegalStateException("Config file is invalid");
Expand All @@ -53,7 +53,7 @@ public Config loadConfig() {
);
} catch (IOException | IllegalStateException e) {
logger.error("Error while loading config", e);
return Config.DEFAULT_CONFIG;
return Config.DEFAULT;
}
}

Expand Down

0 comments on commit f309d64

Please sign in to comment.