I Want To Make A Click Per Second Detecter Plugin

Discussion in 'Spigot Plugin Development' started by NewEraStudios, May 19, 2016.

  1. I Want A Plugin That When A Player With Any Sword Starts To Left Click A Message Above The Health Bar Appears Saying How Many Clicks Per Second Is He Doing.

    Any Ideas?
  2. 1) Have a BukkitRunnable (these are not expensive at all) that runs every 20 ticks (1 second).
    2) In this Task simply check an int to see how many clicks are stored per player, and set this as the player's "Clicks Per Second" then reset that counter to 0.
    3) Elsewhere, everytime the user clicks, simply increment their counter int.
    4) ???
    5) Profit \o/

    Notes: This counter int does not have to be stored in the Task itself. You can store it anywhere you like, as long as it is accessible (preferably without static means) by both the event listener(s) and the Task. This int can be stored as a HashMap<UUID, Integer> to make things simple, but could be part of a more complex Factory type system. The options are endless. ^_^
  3. I think it would make more sense to set metadata on the player rather than using a map, there wouldn't be any lookup times and it would remove itself when the player leaves.

    Please don't type like this it's very hard to read.. rofl
  4. I want a plugin that does this, i can pay, but not a expensive price, look the number 9.0, i want a plugin that when you use sword, that number shows your clicks per second.

    Attached Files:

  5. Use this https://www.spigotmc.org/forums/hiring-developers.55/ for hiring Developers
  6. There is one already... I only forgot the name xD