SpigotMC/Spigot — pull request #126 by drXor (2014-02-25 01:58:12+00:00)
Title: Cancelable WitherSkull wither effect.

WitherSkulls apply a Wither potion effect to any LivingEntity they damage directly. This effect, however, is applied regardless if the entity is invulnerable, has had the damage effect cancelled etc.

This PR verifies that the damageEntity() method has returned true before applying the potion effect, allowing plugins to properly prevent wither damage form WitherSkulls in non-damage areas etc. without having to cancel all Wither-damage events. (Use case: having players be able to shoot skulls and canceling the damage in non-PVP areas, along with the effect; currently, it is impossible to cancel this effect.)