Find out time someone has been in a hashmap for?

Discussion in 'Plugin Development' started by slater96, Aug 11, 2012.

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

    slater96

    Hi, is it possible to get the time that a players name has been in a hashmap for?
    Thanks
     
  2. Offline

    Malikk

    Perhaps run a scheduler and increment an integer and store that with the player?
     
  3. Offline

    Coelho

    What exactly is this used for? There is a lot of ways to do this dependent on the use.
     
  4. Offline

    slater96

    I put player names in a hashmap when I jail someone and wanted to get how long they have been in jail for.
     
  5. Offline

    Eballer48

    Add them to another hashmap at the same time and just don't remove them from that one.
     
  6. Offline

    Pandemoneus

    You actually only need one HashMap<String, Long> in which you store the player's name and the time he got jailed.
    If there is an entry for the player in the HashMap, the player is jailed and you know when.
     
  7. Offline

    Coelho

    If you have multiple HashMap's with the same key, it's just rhetorical. You should store an Object as the value.
     
  8. Offline

    Turtlegasm

Thread Status:
Not open for further replies.

Share This Page