From 42cfe1dc804c113432ceabcf10c81a11d3951cc9 Mon Sep 17 00:00:00 2001 From: Julian Date: Fri, 23 Jun 2023 17:06:11 +0200 Subject: [PATCH] simplify env values to true/false --- .../commands/impl/cloud/CommandECloudDownload.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/commands/impl/cloud/CommandECloudDownload.java b/src/main/java/me/clip/placeholderapi/commands/impl/cloud/CommandECloudDownload.java index 2df77fb..c34bf89 100644 --- a/src/main/java/me/clip/placeholderapi/commands/impl/cloud/CommandECloudDownload.java +++ b/src/main/java/me/clip/placeholderapi/commands/impl/cloud/CommandECloudDownload.java @@ -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();