Solved Death Cause

Discussion in 'Plugin Development' started by bubblefat_, May 28, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    bubblefat_

    How do I get the death cause?
     
  2. Offline

    shades161

  3. Offline

    bubblefat_

  4. Moved to Plugin Development.
     
  5. @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:
    Code:
    event.getCause();
     
  6. Offline

    Konato_K

  7. Offline

    bubblefat_

    @CodePlaysMinecraft

    There is no such thing as event.getCause() user PlayerDeathEvent, its the first thing I tried to do.
     
  8. Offline

    Konato_K

    @bubblefat_ Use getEntity and call getLastDamageCause, this will return an EntityDamageEvent or null, then you can call getCause in there
     
    jaccck likes this.
Thread Status:
Not open for further replies.

Share This Page