1.15.2 Player in gamemode gets hit Event

Discussion in 'Spigot Plugin Development' started by Minimigamer, Jan 26, 2020.

  1. Hey guys Im trying to make an item taht can even kill player in gamemode
    i created the item thats not the problem
    but i cant find and event which gets called if a player in gamemode gets hit

    any ideas how i could do this ?

    I got it with an PlayerInteractEntity but it only works if you rightclick the Player
    so how can i get it with a hit ?
  2. Maybe listen for the player damage event and listened for it cancelled too?
  3. wich event do you mean exactly ?
    There is no PlayerDamageEvent
  4. Unfortunately the Spigot API doesn't have an event for this. You would have to do it a much more difficult way with packets.
  5. I meant EntityDamageByEntityEvent