Fixed mod hash checking
This commit is contained in:
parent
2f7bc1de7f
commit
9e4c8a20d8
@ -65,7 +65,7 @@ public class Ezcheat {
|
||||
|
||||
try (InputStream in = Files.newInputStream(modFile)) {
|
||||
String hash = DigestUtils.sha256Hex(in);
|
||||
modHashes.put(hash, mod.getModId());
|
||||
modHashes.put(mod.getModId(), hash);
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Failed to read mod file for {}: {}", mod.getModId(), e.getMessage());
|
||||
}
|
||||
@ -97,7 +97,7 @@ public class Ezcheat {
|
||||
String modid = entry.getKey();
|
||||
String hash = entry.getValue();
|
||||
|
||||
if (!allowedMods.containsKey(modid) || !allowedMods.get(modid).equalsIgnoreCase(hash)) {
|
||||
if (!allowedMods.containsKey(hash)) {
|
||||
unallowedMods.append(modid).append(", ");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user