try to fix mis-loading library problem

This commit is contained in:
huangyuhui 2016-02-10 17:28:33 +08:00
parent 8b1ff94c5f
commit 2f97cd8104
2 changed files with 9 additions and 7 deletions

View File

@ -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) {

View File

@ -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;
}
}