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


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


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


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


    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


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


    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


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


Thread Status:
Not open for further replies.

Share This Page