mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Fix map matches
Former-commit-id: 3f6e1ac4d321c181bd8a8c64e959d89963e1de1f
This commit is contained in:
1 parent
9f5442cae8
commit
28b7289922
1 file changed
+9
-1
@@ -1110,7 +1110,15 @@ public class Util {
|
||||
* @return Map1 match Map2
|
||||
*/
|
||||
public static boolean mapMatches(@NotNull Map<?, ?> map1, @NotNull Map<?, ?> map2) {
|
||||
return map2.entrySet().containsAll(map1.entrySet());
|
||||
if(!map1.keySet().containsAll(map2.keySet())){
|
||||
return false;
|
||||
}
|
||||
for (Object key : map1.keySet()){
|
||||
if(!map2.get(key).equals(map1.get(key))){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user