Plugin Help Minigame Countdown

Discussion in 'Plugin Help/Development/Requests' started by Minibros, Jul 6, 2015.

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

    Minibros

    Greetings.
    I was wondering if somebody could help me with my Minigame Countdown.
    I want a basic countdown it checks if there are 4 players and starts the game the players are teleported.
    i want that i can just write the cordinates in the code.
    Thank you very much. :)
     
  2. Offline

    VerronCode

    Well First you want to create 2 methods. An Int for counter and Arraylist of Player.
    So What do you want to do is to mane a bukkitrunnable. If the counter reaches 30 you can perform countdown message , and if It reaches 0 do the game start code.

    Example:
    Code:
    int counter = 60;
    
    Bukkit.getScheduler().scheduleSyncRepeatingTask(this.plugin, new Runnable() {
              public void run() {
                if (counter > 0) {
                      //Start code
                      p.sendMessage("Game is starting now!");
                    }
                    if (counter > 30 {
                    p.sendMessage("Starting in " + counter);
                    }
             }, 0L , 0L);
    }
    
     
  3. Offline

    Minibros

    @VerronCode
    I have some errors ( you can see them in the picture. )
    It also runs super quick without stopping.
     

    Attached Files:

  4. Online

    timtower Administrator Administrator Moderator

    @Minibros Where is your JavaPlugin extending class?
     
  5. Offline

    Minibros

    @timtower
    how do you do that?

    this is my countdown (IN THE IMAGE)
    can you send me the JavaPlugin CLASS code?
     

    Attached Files:

  6. Online

    timtower Administrator Administrator Moderator

    @Minibros Now you have 2 classes, you didn't have 2 when I asked the question.
     
  7. Offline

    Minibros

  8. Online

    timtower Administrator Administrator Moderator

  9. Offline

    poepdrolify

    @Minibros @timtower I don't think so, please learn Java and study the Bukkit javadocs
     
Thread Status:
Not open for further replies.

Share This Page