Discussion in 'Plugin Development' started by bubblefat_, May 28, 2015.
How do I get the death cause?
@bubblefat_ is this for coding a plugin?
@bubblefat_ For a plugin?
@shades161 @bwfcwalshy For coding a plugin, yes.
Moved to Plugin Development.
@bubblefat_ To get a player's cause of death, you'd have to check under the PlayerDeathEvent. You would use this line to get a player's cause of death:
@CodePlaysMinecraft Such thing doesn't exists? Or is it something new in 1.8?
There is no such thing as event.getCause() user PlayerDeathEvent, its the first thing I tried to do.
@bubblefat_ Use getEntity and call getLastDamageCause, this will return an EntityDamageEvent or null, then you can call getCause in there
Separate names with a comma.