Copying/Pasting Hashmap Players

Discussion in 'Plugin Development' started by SeanyJo, Oct 7, 2013.

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

    SeanyJo

    Hi, I'm wondering how you would take all of the players in a hashmap called lobby, then take them out of lobby, and place all of them in a new hashmap called Invincible. Heres what I have:
    Code:java
    1. TigreGames.Invincible.putAll(TigreGames.lobby);
    2. TigreGames.lobby.clear();
     
  2. Offline

    FlareLine

    SeanyJo Couldn't you just use a loop to transfer the players one by one? Get the size of the list to loop the correct number of times.
     
  3. Offline

    remremrem

    What is wrong with what you have? I think I would do the same.
     
  4. Offline

    SeanyJo

    I just wanted to make sure that it was correct :)
     
Thread Status:
Not open for further replies.

Share This Page