URGENT: How do I find out who killed a player?

Discussion in 'Plugin Development' started by ludo0777, Mar 19, 2012.

Thread Status:
Not open for further replies.
  1. Which event etc should I use that triggers when a player dies? I need to know who killed them.
     
  2. Offline

    tommykins20

    EntityDeath or something? Check if the entity is an instanceof a Player? Then do some stuff from there, but finding out who killed it, not too sure. I'm pretty sure there's something there that returns the murderer :D
     
  3. I think I've worked it out :D
     
  4. Offline

    tommykins20

    Well done! :D
     
    ludo0777 likes this.
  5. :D
     
  6. Offline

    MCForger

    Its like this on entinitydeath of a player then check if the killer is a player. If it is a player get the killers name else do nothing or just leave blank. i believe its Player.getKiller() and then after that could be .getName(). I dont know I dont have my code/eclispe open right now.
    Hope it helps more!
     
    ludo0777 likes this.
  7. Yeah thats what I used :p
     
  8. Offline

    MCForger

    good ;-)
     
    ludo0777 likes this.
  9. :)
     
Thread Status:
Not open for further replies.

Share This Page