Message in hashmap

Discussion in 'Plugin Development' started by NoSpanMan, Apr 4, 2015.

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

    NoSpanMan

    I want when players join my game lobby that they placed in a hashmap and when the countdown starts only they get messages with starting in: 5,4,3,2,1
     
    Last edited: Apr 4, 2015
  2. Offline

    nverdier

    Did you post this before you were done typing?
     
  3. Offline

    NoSpanMan

    Yes :p Edited
     
  4. Offline

    mine-care

    @NoSpanMan why you want them placed in a hashmap? you can modify your repeating task to broadcast specific time messages as:
    if(time%10 == 1 || time <= 5) //broadcasr
    so if time mod 10 then it is 50,40,30,20,10 and so on, and if time <= 5 then it will print 5,4,3,2,1
     
  5. Offline

    NoSpanMan

    @mine-care I know but i want to broadcast these 5 seconds to only players in the minigame
     
  6. Offline

    mine-care

    @NoSpanMan Then use a list to hold the players, you dont need a map.
     
  7. Offline

    nverdier

    Or a set; No order is required.
     
  8. Offline

    mine-care

    @nverdier true, it fits better + contains no doubles.
     
    nverdier likes this.
  9. Offline

    NoSpanMan

  10. Offline

    nverdier

  11. Offline

    NoSpanMan

    I realy want it now in a hashmap please fast someone D:
     
  12. Offline

    mine-care

    @NoSpanMan umm we already sugested you use sets + the reason for that,
    Why you still want to use a map for? what will the key/value be?
    i really dont get it..
    Try to do as people sugest on your thread especially when the mahjority is telling that to you, if you face any issue with the sugested solution tell the people who sugested it and they will explain it.

    What you have so far (code) ?
     
  13. Offline

    NoSpanMan

    How can i place p. tags in a public void ?

    @mine-care you dont know the other code in my class i need a hashmap.

    <Edit by mrCookieSlime: Merged posts. Please don't double post. There is an Edit Button right next to the Date.>
     
    Last edited by a moderator: Apr 5, 2015
  14. Offline

    mine-care

    http://www.tutorialspoint.com/java/java_methods.htm

    Mhm, if i dont know the implementation how am i supose to know how you should use a map on it? And i dont really understand the question, is it "how to use maps"? is it "how to implement a map in my code"? is it "what is a map"?

    and as i said above,
     
  15. Offline

    NoSpanMan

  16. @NoSpanMan Please explain why you need a HashMap and can't use a HashSet.
     
  17. Offline

    mine-care

    @NoSpanMan you asked
    since i saw in a public void i assumed it is Method related (void) so i sent the reference, i didnt get what p tag is.

    Uppon what @bwfcwalshy said, please provide your code so we can direct you properly.
     
Thread Status:
Not open for further replies.

Share This Page