[SPIGOT-4360] Entities are still affected/destroyed by instances of EntityDamageEvent even when canceled. Created: 09/Sep/18 Updated: 09/Sep/18 Resolved: 09/Sep/18 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Brian | Assignee: | Unassigned |
Resolution: | Invalid | Votes: | 0 |
Labels: | 1.13.1, entitydamageevent, event, explosions | ||
Environment: |
CentOS 7, latest Spigot. |
Version: | 1.13.1 |
Guidelines Read: | Yes |
Description |
I am currently listening for EntityDamageEvent and in the case that either of these is true: entityDamageEvent.getCause() == EntityDamageEvent.DamageCause.ENTITY_EXPLOSION entityDamageEvent.getCause() == EntityDamageEvent.DamageCause.BLOCK_EXPLOSION I am canceling the event. Despite this, primed TNT and creepers still destroy entities (e.g. boats) and knock back entities (e.g. falling blocks). This can be abused in the case that a player manages to launch TNT or lure a creeper into a protected area, thus causing destruction of various entities that would otherwise be protected from a player simply punching them. Additional Note: WorldGuard is also unable to protect entities from explosion. Of course, blocks are protected by canceling EntityExplodeEvent. |
Comments |
Comment by md_5 [ 09/Sep/18 ] |
Boats have a special: Falling block knockback isn't affected by the damage event due to |