~onKill trigger for MythicMobs

Summary

An ~onKill trigger

Usage

Example: a zombie killed another mob, then infect it into a zombie

Value

Very important, why there's only ~onKillPlayer?

Priority

High, and it's not very hard for adding it

Implementation

In versions lower than 1.20.6

EntityDeathEvent -> getLastDamageCause -> instanceof EntityDamageByEntityEvent -> if true, getDamager() -> killer is the mob

Higher:

EntityDeathEvent -> getDamageSource -> blabla -> killer is the mob

Edited by Clexus