Sefiraat / CrystamaeHistoria

Crystamae Historia is a Slimefun4 addon that adds a suite of magical spells with a new crafting and progression system unique compared to other addons.
GNU General Public License v3.0
11 stars 18 forks source link

Rain of Fire Spell throws NPE #202

Open ikizip opened 9 months ago

ikizip commented 9 months ago

The plugin throws an NPE upon using the rain of fire spell if there's no hit entity.

Here's the stacktrace:

[13:50:55 ERROR]: Could not pass event ProjectileHitEvent to CrystamaeHistoria vDEV - 81 (git 0c0efa95)
java.lang.NullPointerException: Cannot invoke "org.bukkit.entity.Entity.getLocation()" because "hitEntity" is null
    at io.github.sefiraat.crystamaehistoria.listeners.SpellEffectListener.entityHitAllowed(SpellEffectListener.java:116) ~[CrystamaeHistoria - DEV 81 (git 0c0ef).jar:?]
    at io.github.sefiraat.crystamaehistoria.listeners.SpellEffectListener.onProjectileHit(SpellEffectListener.java:71) ~[CrystamaeHistoria - DEV 81 (git 0c0ef).jar:?]