How do I get the used item in EntityDamageByEntityEvent?

Discussion in 'Spigot Plugin Development' started by deprilula28, Apr 29, 2017.

  1. (In 1.11 - 1.9) There's a getMainHand method but it doesn't help me much to get the used item.
    Yes its a player, no you don't need the source code but just in case https://github.com/Project-Coalesce/UHC
     
  2. Heen you are using the getMainHand method, it will return the item what is used in the attack I believe. Form Thai, you can get the displayname etc etc..So I think that method will actually help you
     
  3. Why are you creating a new enum called MainHand?
     
    • Agree Agree x 1
    • Funny Funny x 1
  4. Thats from bukkit lol
     
  5. its what .getMainHand returns