LivingEntity.getKiller()

Discussion in 'Plugin Development' started by pie_flavor, Jan 23, 2015.

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

    pie_flavor

    I am curious about one thing, as Bukkit, as we all know, does not have a PlayerKilledByEntityEvent. The best way is to listen for a PlayerDeathEvent and get the killer, but is the killer only active that tick, or will it get the last player to kill them even if TNT blew them up or something?
     
  2. Offline

    teej107

    @pie_flavor I would assume that the killer would be not null until it leaves the server or someone else takes its place. I do not know for sure but I would highly doubt that it would have a value for only 1 tick.

    You can test this yourself by getting killed by a player and then getting killed by something other than a player.
     
Thread Status:
Not open for further replies.

Share This Page