When using the PluginManager.registerEvent() method (not register events) and registering the EntityDamageByEntityEvent class. The event parameter that is then passed to the executor when the event is fired is not an instance of EntityDamageByEntityEvent but of EntityDamageEvent.
The following code
java.lang.ClassCastException: org.bukkit.event.entity.EntityDamageEvent cannot be cast to org.bukkit.event.entity.EntityDamageByEntityEvent
on this line:
Even though the paramClass is what was passed to the registerEvent method originally.