Need Help with minigame!

Discussion in 'Plugin Development' started by Ula492, Jun 20, 2014.

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

    Ula492

    isState says "The method canStart() is undefined for the type TeamDeathMatch"

    timeUntilsStart says "The method canStart() is undefined for the type TeamDeathMatch"

    Code:java
    1. public class StartCountdown implements Runnable{
    2.  
    3. private static int timeUntilStart;
    4.  
    5. @Override
    6. public void run() {
    7. if(GameState.[B][I][U]isState[/U][/I][/B](GameState.IN_LOBBY))
    8. if(Game.canStart()) {
    9. timeUntilStart = 60;
    10. while (true) {
    11. timeUntilStart = 60;
    12. ChatUtilties.broadcast("Minimum Players Reached! Countdown Starting!");
    13. for(; timeUntilStart >= 0; [B][I][U]timeUntilStart[/U][/I][/B]--) {
    14. if(!Game.canStart()) {
    15. ChatUtilties.broadcast("Not enough players to start! Countdown Stopped!");
    16. break;
    17. }
    18. }
    19. if(timeUntilStart == 0) {
    20. TeamDeathMatch.start();
    21. break;
    22. }
    23.  
    24. if(timeUntilStart % 10==0 || timeUntilStart < 10) {
    25. ChatUtilties.broadcast(timeUntilStart
    26. + " seconds until the game starts!");
    27. }
    28.  
    29. try{
    30. Thread.sleep(1000);
    31. e.printStackTrace();
    32. Bukkit.shutdown();
    33. }
    34. }
    35. try{
    36. Thread.sleep(1000);
    37. e.printStackTrace();
    38. Bukkit.shutdown();
    39. }
    40. }
    41. }
    42. }
     
  2. Offline

    Lolmewn

    You're missing a {
    Please format your code properly and you'll see.
     
  3. Offline

    Ula492

  4. Offline

    Lolmewn

    Ula492 Line 7. Seriously though, the formatting already tells you ;)
     
  5. Offline

    Ula492

    xD sowi im a noob at this :/

    Lolmewn Umm it still gives me the same Error?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  6. Offline

    Lolmewn

    Ula492 Have you tried formatting the code?
     
  7. Offline

    Ula492

    Lolmewn What u mean Format? BTW IM A BIG NOOB

    Lolmewn I fixed theisState error :D I saw what i did wrong

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
Thread Status:
Not open for further replies.

Share This Page