mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-05-03 11:40:29 +00:00
add random ids!
This commit is contained in:
committed by
GitHub
parent
4c1ffa2b01
commit
8df8d96ced
@@ -8,6 +8,7 @@ import redis.clients.jedis.JedisPool;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class RedisBungeeConfiguration {
|
||||
@Getter
|
||||
@@ -19,9 +20,15 @@ public class RedisBungeeConfiguration {
|
||||
@Getter
|
||||
private final List<InetAddress> exemptAddresses;
|
||||
|
||||
public RedisBungeeConfiguration(JedisPool pool, Configuration configuration) {
|
||||
|
||||
public RedisBungeeConfiguration(JedisPool pool, Configuration configuration, String randomUUID) {
|
||||
this.pool = pool;
|
||||
this.serverId = configuration.getString("server-id");
|
||||
if (configuration.getBoolean("use-random-id-string", false)) {
|
||||
this.serverId = configuration.getString("server-id") + "-" + randomUUID;
|
||||
} else {
|
||||
this.serverId = configuration.getString("server-id");
|
||||
}
|
||||
|
||||
this.registerBungeeCommands = configuration.getBoolean("register-bungee-commands", true);
|
||||
|
||||
List<String> stringified = configuration.getStringList("exempt-ip-addresses");
|
||||
@@ -33,4 +40,5 @@ public class RedisBungeeConfiguration {
|
||||
|
||||
this.exemptAddresses = addressBuilder.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user