EntityDeathEvent

Discussion in 'Spigot Plugin Development' started by Igasi, Apr 17, 2017.

?

yes

  1. yes

    5 vote(s)
    83.3%
  2. no kys

    1 vote(s)
    16.7%
  1. So yeah. Im working on a plugin and I want to make an interaction between the killer and the victim, sucks that they done have the e.getKiller(), doesnt it? What if we add that method to the event in the next version of spigot? Aint it a great idea? kthxbai
     
    • Optimistic Optimistic x 1
  2. you can use e.getEntity().getKiller()

    Code (Text):
    @EventHandler
        public void onDeath(EntityDeathEvent e)
        {
            e.getEntity().getKiller().sendMessage("that wasnt nice!");
        }
     
    • Like Like x 1
    • Agree Agree x 1
  3. As I stated above:
    e.getKiller() doesn't exist. :(
     
    • Like Like x 1
  4. YES EXACTLY k