Need help with epc (energy per click).

Discussion in 'Spigot Plugin Development' started by yoady444, May 4, 2017.

  1. im trying to detect any click of the player when he hits another player.
    I have tried to use runnables, block iterator.

    - ZoniPets
     
  2. I'm fairly newbie but, check entitydamagebyentity? That'll give you the attacking of a player?
    Apologies if I misread your post!
     
  3. Its per hit not per click so it can't help me.
     
  4. PlayerInteractEvent Action.LEFT_CLICK_AIR?
     
  5. Maybe use player interact with vector calculation? You should also make sure you restrain the radius of the entity, I believe it is 5 blocks
     
  6. he means every time you click (NOT EVERY TIME YOU HIT) on a player your exp bar goes up a certain amount. This is Mega Walls he is trying to make. I don't know if PlayerInteractEvent has a LEFT_CLICK_PLAUER or not so yeah
     
  7. Nvm I made it guys
     
  8. Just to clear it up with that, you could detect it with some vector things if youre clicking at a player
     
  9. It would be PlayerInteractEntityEvent then use event#getRightClicked to get what entity was clicked, then check if it's an instanceof Player


    Sent from my iPhone using Tapatalk