mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
simplify env values to true/false
This commit is contained in:
parent
92a7d54664
commit
42cfe1dc80
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user