Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void gameStartTimer() {
- new BukkitRunnable() {
- public void run() {
- if (CURRENT_PLAYERS == MAX_PLAYERS) {
- for (int i = 30; i > -1; i--) {
- if (i == 30) {
- Bukkit.getServer().broadcastMessage(ChatColor.GRAY + "The game will start in 30 seconds");
- }
- if (i == 15) {
- Bukkit.getServer().broadcastMessage(ChatColor.GRAY + "The game will start in 15 seconds");
- }
- if (i >= 5) {
- Bukkit.getServer().broadcastMessage(ChatColor.GRAY + "The game will start in " + i + " seconds");
- }
- if (i == 0) {
- Bukkit.getServer().broadcastMessage(ChatColor.GRAY + "The game is starting..");
- }
- }
- } else {
- this.cancel();
- }
- }
- }.runTaskTimer(this, 20, 20);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement