mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-02-05 03:45:28 +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) {
|
private boolean areUnverifiedExpansionsAllowed(@NotNull final PlaceholderAPIPlugin plugin) {
|
||||||
String env = System.getenv("PAPI_ALLOW_UNVERIFIED_EXPANSIONS");
|
String env = System.getenv("PAPI_ALLOW_UNVERIFIED_EXPANSIONS");
|
||||||
if (env != null) {
|
if (env != null) {
|
||||||
switch (env.toLowerCase()) {
|
return env.equalsIgnoreCase("true");
|
||||||
case "true":
|
|
||||||
case "yes":
|
|
||||||
case "1":
|
|
||||||
return true;
|
|
||||||
case "false":
|
|
||||||
case "no":
|
|
||||||
case "0":
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return plugin.getPlaceholderAPIConfig().cloudAllowUnverifiedExpansions();
|
return plugin.getPlaceholderAPIConfig().cloudAllowUnverifiedExpansions();
|
||||||
|
Loading…
Reference in New Issue
Block a user