Left click detection when block behind entity

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

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

    funtastisch

    Hey there,

    I'm currently coding a Click per Second Plugin for my friend. I try to count the cps of a player. Since you can't detect player input from mouse clicks I tried to work with Left click on air and block actions. But now there is a problem. When hitting a player while a block is behind him and it is in range, the click is not being detected. So the player isn't hitting a block but the air neither. Is there an idea for a workaround?

    Cheers
     
  2. Offline

    timtower Administrator Administrator Moderator

    @funtastisch EnityDamageEvent, PlayerInteractEntityEvent.
     
  3. Offline

    funtastisch

    @timtower when damaging an entity not the actual left click speed is tracked. So you click more often than give damage.
     
Thread Status:
Not open for further replies.

Share This Page