From 9e4c8a20d82c732cea59aa54aacee0d83f23b854 Mon Sep 17 00:00:00 2001 From: Verox001 Date: Wed, 14 May 2025 20:40:33 +0200 Subject: [PATCH] Fixed mod hash checking --- src/main/java/com/cimeyclust/ezcheat/Ezcheat.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cimeyclust/ezcheat/Ezcheat.java b/src/main/java/com/cimeyclust/ezcheat/Ezcheat.java index 088ef94..b167f45 100644 --- a/src/main/java/com/cimeyclust/ezcheat/Ezcheat.java +++ b/src/main/java/com/cimeyclust/ezcheat/Ezcheat.java @@ -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(", "); } }