From f309d64225b7e54f73fecf247ec8ca87a5864472 Mon Sep 17 00:00:00 2001 From: voruti <45130096+voruti@users.noreply.github.com> Date: Sat, 22 Jul 2023 12:05:27 +0200 Subject: [PATCH] Rename var --- .../java/voruti/velocityplayerlistquery/model/Config.java | 2 +- .../velocityplayerlistquery/service/PersistenceService.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/voruti/velocityplayerlistquery/model/Config.java b/src/main/java/voruti/velocityplayerlistquery/model/Config.java index 5372f80..9dd7104 100644 --- a/src/main/java/voruti/velocityplayerlistquery/model/Config.java +++ b/src/main/java/voruti/velocityplayerlistquery/model/Config.java @@ -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) diff --git a/src/main/java/voruti/velocityplayerlistquery/service/PersistenceService.java b/src/main/java/voruti/velocityplayerlistquery/service/PersistenceService.java index 497d171..a768565 100644 --- a/src/main/java/voruti/velocityplayerlistquery/service/PersistenceService.java +++ b/src/main/java/voruti/velocityplayerlistquery/service/PersistenceService.java @@ -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"); @@ -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; } }