[SPIGOT-1516] Method Entity#damage(Integer) doesn't call EntityDamageEvent Created: 25/Feb/16  Updated: 27/Feb/16  Resolved: 27/Feb/16

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Luke Kander Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: Bug, EntityDamageEvent
Environment:

Windows 10, IntelliJ Debug



 Description   

I have this listener
[code]
@EventHandler(priority = EventPriority.HIGHEST)
public void damage(EntityDamageEvent e) {
nServer.log(Level.DEBUG, "IS PLAYER: " + (e.getEntity() instanceof Player));
if (e.getEntity() instanceof Player)

{ Player p = (Player) e.getEntity(); nServer.log(Level.DEBUG, "WONT KILL: " + (p.getHealth() - e.getDamage() > 0)); }

}
[/code]
And when I do Player#Damage(1000), the event doesn't fire...
A bug? Anyway I can bypass this?

Console:
[code]
//Fall damage
[23:11:14 INFO]: [nAPI] [DEBUG] IS PLAYER: true
[23:11:14 INFO]: [nAPI] [DEBUG] WILL KILL: false
//Kill command
[23:11:20 INFO]: DeprecatedLuke issued command /pluginkilltest
//EVENT NOT FIRED
[23:11:20 INFO]: DeprecatedLuke died
[/code]



 Comments   
Comment by Luke Kander [ 25/Feb/16 ]

Uh.. It duplicated the issue (Spigot-1515) close this one

Generated at Tue Apr 15 11:10:00 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.