How to detect if the event is being fired?

Discussion in 'Plugin Development' started by TigerHix, Oct 22, 2013.

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

    TigerHix

    There is no "release mouse click" event in Bukkit, so I come up with this question.

    For example, I have a magic wand there. When I right click, a block start to float up to the sky; when no longer right click, the block fall slowly.

    Theres actually a way - First when right click, block.y += 0.2; also running a task every tick, and block.y -= 0.1. But the block will be "shaking" in the air then.

    So is there a way to detect the event is running/stopped? Thanks in advance.
     
  2. Offline

    Pizza371

    TigerHix it wont keep firing I don't think.
    It will only fire once when he initially clicks
     
  3. Offline

    Garris0n

    The client sends a mouse click every so often when the right mouse click is held down.
     
  4. Offline

    waicool20

    Just set a boolean to true if its running and then set it to false when its about to stop maybe?
     
  5. Offline

    TigerHix

    Thats what I am thinking. But, when do I know its stopped?
     
  6. Offline

    waicool20

    hmm when the player clicks on the block check every tick or two if he is still right clicking on the same block
     
  7. Offline

    TigerHix

    How about air? :eek: Magician won't face a random block and use his wand to float another block.
     
Thread Status:
Not open for further replies.

Share This Page