Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private int round = 1;
- private int seconds = 61;
- public void start() {
- runTaskTimer(Test.getInstance(), 0L, 20L);
- }
- public void stop() {
- cancel();
- }
- public void run() {
- if (this.seconds == 0) {
- if (this.round == 5) {
- Bukkit.broadcastMessage(Epidemic.getInstance().getPrefix() + "§cSpiel vorbei.");
- stop();
- } else {
- this.round++;
- this.seconds = 61;
- Bukkit.broadcastMessage(Epidemic.getInstance().getPrefix() + "Die Runde §e" + this.round + " §7ist vorbei!");
- //Now there should be a 10 second break before the next round begins
- }
- } else {
- switch (seconds) {
- case 120: case 60: case 30: case 20: case 10: case 5: case 4: case 3: case 2: case 1:
- Bukkit.broadcastMessage(Epidemic.getInstance().getPrefix() + "Die Runde ist vorbei in §e" + this.seconds + " §eSekunden§7!");
- break;
- }
- this.seconds--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment