1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-09-02 19:02:33 +02:00

Allow server name to be specified by a system property

This commit is contained in:
Luck
2021-03-13 14:16:02 +00:00
parent 370e2aed0d
commit 53bb61f9b2

View File

@@ -85,7 +85,13 @@ public final class ConfigKeys {
/**
* The name of the server
*/
public static final ConfigKey<String> SERVER = lowercaseStringKey("server", "global");
public static final ConfigKey<String> SERVER = key(c -> {
String server = c.getString("server", "global").toLowerCase();
if (server.equals("load-from-system-property")) {
server = System.getProperty("luckperms.server", "global").toLowerCase();
}
return server;
});
/**
* How many minutes to wait between syncs. A value <= 0 will disable syncing.