Fixed mod hash checking

This commit is contained in:
Verox001 2025-05-14 20:40:33 +02:00
parent 2f7bc1de7f
commit 9e4c8a20d8

View File

@ -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(", ");
}
}