How I make timer in bukkit?

Discussion in 'Plugin Development' started by RoiyAk, Jan 31, 2013.

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

    RoiyAk

    Hey,
    I want to make "Time Played" Plugin, but i dont know how to do that.
    Hot i save the player information, and start the timer.

    Thanks!
     
  2. Offline

    Cjreek

    You could just listen to the Join and disconnect events and then calculate the time inbetween.
     
  3. Offline

    teunie75

    You can use the system time for this ;)
     
  4. Offline

    Royal_Soda

    In order to complete the task, RoiyAk, you'll need to set up a listener and include at least two events to track player joining and leaving. You should be able to save the join time in a variable, then when the player leaves, have your code add the total time to a saved variable in a file, or add a new variable. (Depends on whether the player is new or not.) You'll need to write/read to and from a file and be able to get the server's time.
     
Thread Status:
Not open for further replies.

Share This Page