-
Type:
New Feature
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
With the new PvP mechanics added in 1.9, swords were changed to a sweep style of attacking. For some, this could cause complications to various types of PvP or PvE related plugins that need the precise single-entity hit function for swords. To allow a fix for this, I am proposing that you add another enum constant in the DamageCause enum called along the lines of "ENTITY_SWEEP_ATTACK". The entity the player directly hits would have it's damage event thrown with its cause being ENTITY_ATTACK, but the entities surrounding the one directly hit would have their damage causes be the ENTITY_SWEEP_ATTACK. If the an EntityDamageEvent is cancelled and the cause is ENTITY_SWEEP_ATTACK, the entities will not take damage or knockback, but the entity directly hit will still take damage. Thanks for your consideration!