Fixed spells not executing their on destroy handlers

This commit is contained in:
Sollace 2024-09-19 21:24:28 +01:00
parent c05ccb87ab
commit 3d8d61c678
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -114,8 +114,10 @@ class MultiSpellSlot implements SpellSlots, NbtSerialisable {
} else { } else {
Spell s = spell.get(); Spell s = spell.get();
if (s != null) { if (s != null) {
s.setDead();
s.tickDying(owner); s.tickDying(owner);
if (s.isDead()) {
s.destroy(owner);
}
} }
} }
} }