2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-05 04:48:02 +00:00

Add logging for server id

This commit is contained in:
Weihao 2021-05-08 21:36:31 -04:00
parent 2078287bec
commit 87e4defb54

View File

@ -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()) {