diff --git a/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/core/version/MinecraftLibrary.java b/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/core/version/MinecraftLibrary.java index 57c1f7224..1fd8b7956 100755 --- a/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/core/version/MinecraftLibrary.java +++ b/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/core/version/MinecraftLibrary.java @@ -56,13 +56,15 @@ public class MinecraftLibrary extends IMinecraftLibrary { @Override public boolean allow() { if (rules != null) { - String action = "disallow"; + boolean flag = false; for (Rules r : rules) - if (r.action() != null) - action = r.action(); - return "allow".equals(action); - } - return true; + if ("disallow".equals(r.action())) + return false; + else if ("allow".equals(r.action())) + flag = true; + return flag; + } else + return true; } private String formatArch(String nati) { diff --git a/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/core/version/Rules.java b/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/core/version/Rules.java index 1dd62bf26..dc3fdfa3b 100755 --- a/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/core/version/Rules.java +++ b/HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/core/version/Rules.java @@ -36,7 +36,7 @@ public class Rules { } public String action() { - return os != null && os.isCurrentOS() ? action : null; + return os == null || os != null && os.isCurrentOS() ? action : null; } }