Allow server name to be specified with an env var (#3341)

This commit is contained in:
Marton Schneider 2022-03-16 22:01:21 +01:00 committed by GitHub
parent 138f2c1b3e
commit eeec818286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,6 +93,9 @@ public final class ConfigKeys {
if (server.equals("load-from-system-property")) {
server = System.getProperty("luckperms.server", "global").toLowerCase(Locale.ROOT);
}
if (server.equals("load-from-environment-variable")) {
System.getenv().getOrDefault("LUCKPERMS_SERVER", "global").toLowerCase(Locale.ROOT);
}
return server;
});