diff --git a/core/src/main/java/net/momirealms/craftengine/core/pack/host/impl/S3Host.java b/core/src/main/java/net/momirealms/craftengine/core/pack/host/impl/S3Host.java index 7ec02bff9..dad48ea33 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/pack/host/impl/S3Host.java +++ b/core/src/main/java/net/momirealms/craftengine/core/pack/host/impl/S3Host.java @@ -214,7 +214,7 @@ public class S3Host implements ResourcePackHost { if (port <= 0 || port > 65535) { throw new LocalizedException("warning.config.host.proxy.missing_port"); } - String scheme = (String) proxySetting.get("scheme"); + String scheme = Optional.ofNullable(proxySetting.get("scheme")).map(String::valueOf).orElse(null); if (scheme == null || scheme.isEmpty()) { throw new LocalizedException("warning.config.host.proxy.missing_scheme"); }