~onDeath and @threattable or @tt not functioning properly.
Summary
Describe the bug encountered in detail.
-If the mob dies due to something that isn't a threat table entity, such as suffocation, the mob just states that it cannot find a name for the player. After making the pastebin, I had corrected the <caster.var.expGive> to the correct variable. but that caused no change in the error for the ~OnDeath triggers.
Intended correct behavior
Upon Mob Death, I should receive 2 messages in game. "&e(&6Server&e)&fYou have gained <caster.var.expGive> exp." "&e(&6Server&e)&fYou had <target.threat> threat." and I should have been given exp based on "mmocore admin exp give <target.name> main <caster.var.moblevelcalc>"
Steps to reproduce
Provide a full set of steps used to reproduce the bug, including links to SEPARATE Pastebin pastes for each relevant configuration file.
Mob: Mob: https://pastebin.com/44ZDvQ8y
Current behavior
Spawn the mob, either from spawner or /mm m spawn <mob.name> Kill the mob. Error is thrown in console on mob death instead of suspected result.
Describe what happens currently, while the bug is affecting your server.
After setting a variable or using other skills. The mob is supposed to grant exp and a display message on their death granting the experience. After death, they do not trigger, and instead throw an error message in console.
Intended correct behavior
Describe what you think should happen instead of the bug.
"&e(&6Server&e)&fYou have gained <caster.var.expGive> exp." "&e(&6Server&e)&fYou had <target.threat> threat." and I should have been given exp based on "mmocore admin exp give <target.name> main <caster.var.moblevelcalc>"
Server log file
Provide a link to a Pastebin paste with a copy of your server's latest.log file from startup to "Done!" AND includes a player connecting.
Debug log snippet
Provide a link to a Pastebin paste with an excerpt of your latest.log file that includes debug output where you trigger the bugged behavior.
Proposed fixes
Have the ~onDeath read the threattable before clearing it to allow commands or other skills to be ran on death using threat tables as targets.
Describe what you think the issue or any potential fixes may be.
I suspect the Issue lies in the Threattable targeters triggering after the target dies and clears their threattable where it should trigger before the entity clears the table.