Timer

Discussion in 'Plugin Development' started by #define, Apr 19, 2012.

Thread Status:
Not open for further replies.
  1. Hi, I'm planning to make a plugin.

    The plugin is a timer that keeps track how long my user's are online.
    My question is: is it possible to add Timers for each user that log's in ?

    Thanks!
     
  2. Offline

    Mitsugaru

    Don't make a Timer object. Use Bukkit's scheduler to make timed actions.
    http://wiki.bukkit.org/Scheduler_Programming

    So, on the PlayerJoinEvent, you would make some object to handle the thread per player.

    Although, I'll be honest with you, I feel like you're better off by grabbing the date and time from when they join and then doing a comparison to the time when they leave... That way, you're not making a tread per player JUST to record the time they were on the server....
     
Thread Status:
Not open for further replies.

Share This Page