HashMaps

Discussion in 'Plugin Development' started by winitro, Aug 22, 2014.

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

    winitro

    Is there anyway I can put a offline player into a hashmap? And keep him or her there for 24 hours?
     
  2. Offline

    Heki

    Stick the uuid in there along with a timestamp and check every hour or more frequent?
     
  3. Offline

    Heki

    Did that help you?
     
  4. Offline

    GameplayJDK

    winitro You should store them in a config file, HashMaps won't be kept when you shut down your server.
    (You'd get a timestamp using System.currentTimeMillis() or, if you want to be extra-precise System.nanoTime()).
     
  5. Offline

    winitro

    Alright thanks!
     
  6. Offline

    Garris0n

    I don't see why you would ever need nano time when you're working with code that only ticks once every 50 milliseconds.
     
  7. Offline

    GameplayJDK

    Garris0n I think it's worth mentioning, that there are 2 way, of course it's smarter to use System.currentTimeMillis() :D
     
Thread Status:
Not open for further replies.

Share This Page