Check if a player's online time is 1, 2...4 hour(s)

Discussion in 'Plugin Development' started by Jozeth, Oct 28, 2013.

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

    Jozeth

    I am trying to add a feature that gives out items per hour that a player has been online.

    How do I check if a player has played for one hour (then the next hour, etc.), then reset the timer?
     
  2. Offline

    maciekmm

    On join add player nickname to hashmap with join time, on leave remove him from hashmap, check every 1h/30min if player passed specific time.
     
  3. Offline

    Jozeth

    Aren't hashmaps reset if the server restarts or reloads?
     
  4. Offline

    maciekmm

    they're, you can save it in mysql/sqlite db if you want.
     
Thread Status:
Not open for further replies.

Share This Page