Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. public static void startCountdown() {
  2. Bukkit.getScheduler().runTaskTimer(getInstance(), new Runnable() {
  3.  
  4. @Override
  5. public void run() {
  6. if (ingame.size() >= 2) {
  7. count--;
  8.  
  9. if (count == 120 || count == 60 || count == 30
  10. || count == 15 || count == 10 || count == 5
  11. || count == 4 || count == 3 || count == 2
  12. || count == 1) {
  13.  
  14. for (Player k : ingame) {
  15.  
  16. k.sendMessage(Strings.PR
  17. + "§eDas Spiel beginnt in §3" + count
  18. + " §eSekunden!");
  19.  
  20. }
  21.  
  22. } else if (count == 0) {
  23. for (Player k : ingame) {
  24.  
  25. k.sendMessage(Strings.PR
  26. + "§eDas Spiel beginnt in §3Jetzt §e!");
  27. teleportArena();
  28.  
  29. }
  30.  
  31. inArena = true;
  32. joinable = false;
  33. moveable = false;
  34. teleportArena();
  35.  
  36. for (int i = 1; i < ingame.size(); i++) {
  37. Player p = ingame.get(i);
  38.  
  39. p.teleport(getSpawn(i));
  40.  
  41. }
  42.  
  43. }
  44.  
  45. }
  46.  
  47. }
  48.  
  49. }, 20, 20);
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement