[SPIGOT-255] Call an event for Invulnerable Entities Created: 21/Dec/14 Updated: 22/Dec/14 |
|
Status: | Open |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Minor |
Reporter: | Ali Moghnieh | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 3 |
Labels: | entity, interact, invulnerable, minecraft, nbt |
Description |
Hi, I propose an interact event of some sort get called for invulnerable entities. At the moment, if an Entity has the Invulnerable NBT tag, and a client sends the left clicking packet on that entity, the Entity.damageEntity(..) method checks if that is the case, if it is, it simply returns false (doesn't call the damage event), thus leaving no evidence that the player actually interacted with the entity (other than packet sniffing). This also applies to the maxNoDamageTicks. I propose a new event be created specifically for this type of action. I would NOT recommend this call the PlayerInteractEntityEvent as this may confuse some plugins which would expect the event only to be called when the entity is right clicked. |
Comments |
Comment by Ali Moghnieh [ 22/Dec/14 ] |
It does for right clicking. But not for left clicking, which is expected behaviour. There is currently no way of telling if a player left clicked an invulnerable entity through the api. |
Comment by md_5 [ 22/Dec/14 ] |
PlayerInteractEntityEvent or whatever it is called? Does that not work? |