More right and left clicks

Discussion in 'Plugin Development' started by Darris, Sep 21, 2019.

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

    Darris

    Hello! I need to check the player's right click and do something with it. Of course, I understand that we need PlayerInteractEvent. But I need more than just Action.RIGHT_CLICK_AIR or Action.RIGHT_CLICK_BLOCK. I need to check a few player clicks. Suppose, if player clicks 3 times right, then him will write "hi."
     
  2. Offline

    wand555

    Make a hashmap and store each time Action.RIGHT_CLICK is called
     
  3. Offline

    Darris

    How to do it? Keep in mind that clicks can be LEFT (left-right-right) or (left-right-left)
     
  4. Offline

    wand555

    Have two hashmaps. Increment the value of each hashmap by one each time the fitting event was triggered and check whenever, if both hashmaps have the amounts you want them to have.
     
Thread Status:
Not open for further replies.

Share This Page