From 87e4defb547c523b3a6bde0b6d641fd89e7dc95a Mon Sep 17 00:00:00 2001 From: Weihao Date: Sat, 8 May 2021 21:36:31 -0400 Subject: [PATCH] Add logging for server id --- .../imaginarycode/minecraft/redisbungee/RedisBungee.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java index a4cb965..66db192 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java @@ -422,8 +422,12 @@ public final class RedisBungee extends Plugin { // Configuration sanity checks. if (serverId == null || serverId.isEmpty()) { - configuration.set("server-id", UUID.randomUUID().toString()); + String genId = UUID.randomUUID().toString(); + getLogger().info("Generated server id " + genId + " and saving it to config."); + configuration.set("server-id",genId); ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, new File(getDataFolder(), "config.yml")); + } else { + getLogger().info("Loaded server id " + serverId + '.'); } if (redisServer != null && !redisServer.isEmpty()) {