How to make a joinable lobby?

Discussion in 'Plugin Development' started by Connal, Aug 24, 2013.

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

    Connal

    How do i make a lobby that is joinable? ex: /example join
    How do i do this? So that when i do this ex: /example start
    it will only start and tp people that have joined?
    Thanks :)
     
  2. Offline

    JPG2000

    Connal Maby an ArrayList? Store the players name in there and teleport everyone who has there name.
     
  3. Offline

    Connal

    Thanks! Good idea! Now umm, do you know how to make an array list? (I only know basics and a bit at java)
    ty :)
     
  4. Offline

    JPG2000

    Connal Um yes. But I would honostoy try to learn more java before a big task. Do you even know what an ArrayList is?

    to make:
    ArrayList<String> lobby = new ArrayList<String>();

    to add players:
    lobby.add(player.getName());

    to remove:
    lobby.remove(player.getName());

    to check if there on one:
    if (lobby.contains(player.getName()));

    PS sorry if this came out rude, I didnt mean it to be :D
     
  5. Offline

    Connal

    Yes i do know what an ArrayList is, and yea i really need to learn some more, thanks! :)
     
  6. Offline

    JPG2000

    Connal No problem. Oh and you should mmake the ist public and static so others can use it.
     
  7. Offline

    Connal

    ok thanks :)
     
Thread Status:
Not open for further replies.

Share This Page