Magic

Magic

190k Downloads

HitEvent

christophe6 opened this issue ยท 4 comments

commented

Hi

Could it be possible to add an HitEvent to magic?

commented

There is a CastEvent:

https://github.com/elBukkit/MagicPlugin/blob/master/MagicAPI/src/main/java/com/elmakers/mine/bukkit/api/event/CastEvent.java#L43

You can call getSpellResult, if the result is CAST it was a hit.

commented

How can I get the target?

commented
commented

Hm- try getSpell().getCurrentCast().getTargetedEntities() (there may be more than one target, such as for AOE spells)