Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void startCountdown() {
- Bukkit.getScheduler().runTaskTimer(getInstance(), new Runnable() {
- @Override
- public void run() {
- if (ingame.size() >= 2) {
- count--;
- if (count == 120 || count == 60 || count == 30
- || count == 15 || count == 10 || count == 5
- || count == 4 || count == 3 || count == 2
- || count == 1) {
- for (Player k : ingame) {
- k.sendMessage(Strings.PR
- + "§eDas Spiel beginnt in §3" + count
- + " §eSekunden!");
- }
- } else if (count == 0) {
- for (Player k : ingame) {
- k.sendMessage(Strings.PR
- + "§eDas Spiel beginnt in §3Jetzt §e!");
- teleportArena();
- }
- inArena = true;
- joinable = false;
- moveable = false;
- teleportArena();
- for (int i = 1; i < ingame.size(); i++) {
- Player p = ingame.get(i);
- p.teleport(getSpawn(i));
- }
- }
- }
- }
- }, 20, 20);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement