diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/spellbook/SpellbookPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/spellbook/SpellbookPlugin.java index a6eae0b652..0502330b79 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/spellbook/SpellbookPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/spellbook/SpellbookPlugin.java @@ -586,11 +586,11 @@ public class SpellbookPlugin extends Plugin { ImmutableSet tmp = ImmutableSet.copyOf(notFilteredSpells); - for (int id : spells.keySet()) + for (Map.Entry spell : spells.entrySet()) { - Widget w = client.getWidget(WidgetInfo.TO_GROUP(id), WidgetInfo.TO_CHILD(id)); // y tho let me just plop in id + Widget w = client.getWidget(WidgetInfo.TO_GROUP(spell.getKey()), WidgetInfo.TO_CHILD(spell.getKey())); // y tho let me just plop in id - if (w == null || !w.getBounds().contains(point) || !isUnfiltered(spells.get(id).getName(), tmp)) + if (w == null || !w.getBounds().contains(point) || !isUnfiltered(spell.getValue().getName(), tmp)) { continue; }