Actual input left click detection

Discussion in 'Plugin Development' started by funtastisch, Jun 11, 2020.

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

    funtastisch

    Hey there,

    I learned the basics about Java in school and now a friend asked me to program a plugin for him. I am really excited about this task because I enjoy programming as a hobby. I try to learn as much as i can by reading pages / forum threads or watching videos about specific topics that will bring me forward. Basically learning by doing.

    Anyway, here is my problem: I try to detected the clickspeed of a player. I used a HashMap and the PlayerInteractEvent and counted the clicks upwards on the LEFT_CLICK_AIR and the LEFT_CLICK_BLOCK action. But i soon figured out that this doesn't count the actual clicks done by the mouse. E.g.: when holding down left mouse button on grass there are several clicks counted instead of just one.

    I hope someone has a tip for me or can give me a go-around to this problem. I wasn't able to find one on Google, sadly.

    Cheers, greetings from Germany.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @funtastisch Those clicks are not send to the server, we can't check the buttons.
     
  3. Offline

    funtastisch

    Oh okay, yeah i already thought about a problem like this. I thought about a go-around where clicks in grass are ignored when counting. Still, there will be detection problems in the nether e.g. efficiency V in pickaxe breaking netherrack blocks. I still have no solution to this.
     
Thread Status:
Not open for further replies.

Share This Page