Coundown timer NEED HELP!

Discussion in 'Plugin Development' started by zakkinu2, Sep 19, 2013.

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

    zakkinu2

    I have been searching over a whole day i found nothing, and i really need help i need to find a way to have multiple lists of players and have a separate countdown for each of them. Any help please!?
     
  2. Well what you could its not the best in the world but to tide you over you could try
    Code:java
    1. try {
    2. // The Thread.sleep(1000) == That the timer will sleep/delay for 1 second each 1000 is equal to 1 second
    3. Thread.sleep(1000);
    4. } catch(InterruptedException ex) {
    5. Thread.currentThread().interrupt();
    6. }
     
  3. Offline

    zakkinu2

  4. Offline

    tommycake50

    *facepalm* no.
     
    WauloK likes this.
  5. Offline

    zakkinu2

    tommycake50 i tried that that will like stop the whole server till it finishes...! i really need help please! i have been working on my frist plugin for like a week and i havent even finished the lobby part
     
  6. Offline

    tommycake50

    What Exactly do you want? A countdown for every player or all of the players in one list?
     
  7. Offline

    zakkinu2

    tommycake50 I have like signs when you right clickthem they tp you somwhere and you join a list. I want it so when the List.size() >=2 then it will activate a 60 second countdown timer only for the players in that list. and i want it so if another list.size()>=2 at the same time as the other countdown timer is working it will do the same thing but only for the people who are on that list
     
  8. Offline

    tommycake50

    It would be a good idea to create your own List class which checks itself then you don't have to do any messy work around it.
     
  9. Offline

    zakkinu2

    tommycake50 This is my first minigame ever i am making so i dont know how to really set up a game with the signs and stuff so i made it like i already told you it will put them in a team when they right click and stuff. But i already have it setup so it detecs how many people are in it and it will remove him from the list when he disconnects or does /leave but the only problem is the countdown.
     
  10. Offline

    tommycake50

    You do know how to use schedulers right :confused:?
    http://wiki.bukkit.org/Scheduler_Programming
     
  11. Offline

    zakkinu2

    tommycake50 i do know something about them yes i tried using them but the problem is i dont know how to make them separate for every list
     
  12. I told you to use a sleep timer then test if =1++ counter use a counter in the if statements example...
    Code:java
    1. if(counter, counter = 2, counter++){
    2. if(Bukkit.getOnlinePlayer == 2){
    3. counter++ = //Put any number here use probably 1 for your proposes
    4. counter++ = 1;
    5. Bukkit.broadcastMessage(counter);
    6. }
    7. }
    8. return false;
     
Thread Status:
Not open for further replies.

Share This Page