Fixed SpellCastEvents not being dispatched properly

Fixes achievement diary tasks that trigger on spell cast
This commit is contained in:
vddcore
2022-07-12 13:20:24 +00:00
committed by Ryan
parent 1f89ef3e4d
commit 10f1b1515f
@@ -44,10 +44,7 @@ public final class MagicBookInterface extends ComponentPlugin {
SpellListeners.run(button, SpellListener.NONE, SpellUtils.getBookFromInterface(component.getId()),player,null); SpellListeners.run(button, SpellListener.NONE, SpellUtils.getBookFromInterface(component.getId()),player,null);
boolean result = MagicSpell.castSpell(player, spellBook, button, player); boolean result = MagicSpell.castSpell(player, spellBook, button, player);
if (result) {
player.dispatch(new SpellCastEvent(spellBook, button)); player.dispatch(new SpellCastEvent(spellBook, button));
}
return result; return result;
} }