From cc9f470cea807cb49d9df54dfba36d43470b4146 Mon Sep 17 00:00:00 2001 From: luluxe Date: Wed, 26 Apr 2023 22:37:44 +0200 Subject: [PATCH] rename server-name to server-id to make it more understandable --- .../communityanalytics/spigot/configs/SpigotConfigLoader.java | 3 +++ src/main/resources/config.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/communityanalytics/spigot/configs/SpigotConfigLoader.java b/src/main/java/net/communityanalytics/spigot/configs/SpigotConfigLoader.java index 47405e4..5c90c52 100644 --- a/src/main/java/net/communityanalytics/spigot/configs/SpigotConfigLoader.java +++ b/src/main/java/net/communityanalytics/spigot/configs/SpigotConfigLoader.java @@ -17,6 +17,9 @@ public SpigotConfig loadConfig() { boolean debug = yamlConfiguration.getBoolean("debug"); int minimumSessionDuration = yamlConfiguration.getInt("minimum-session-duration"); String serverName = yamlConfiguration.getString("server-name"); + if(serverName == null) { + serverName = yamlConfiguration.getString("server-id"); + } return new SpigotConfig(platformApiToken, serverName, debug, minimumSessionDuration); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 4234720..d8f7831 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -14,4 +14,4 @@ debug: false minimum-session-duration: 0 # Server name is used to store player's sessions -server-name: 'skyblock' +server-id: 'skyblock'