simplify env values to true/false

This commit is contained in:
Julian 2023-06-23 17:06:11 +02:00
parent 92a7d54664
commit 42cfe1dc80
No known key found for this signature in database
GPG Key ID: A0CA42F79DA926B1
1 changed files with 1 additions and 10 deletions

View File

@ -51,16 +51,7 @@ public final class CommandECloudDownload extends PlaceholderCommand {
private boolean areUnverifiedExpansionsAllowed(@NotNull final PlaceholderAPIPlugin plugin) {
String env = System.getenv("PAPI_ALLOW_UNVERIFIED_EXPANSIONS");
if (env != null) {
switch (env.toLowerCase()) {
case "true":
case "yes":
case "1":
return true;
case "false":
case "no":
case "0":
return false;
}
return env.equalsIgnoreCase("true");
}
return plugin.getPlaceholderAPIConfig().cloudAllowUnverifiedExpansions();