Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.h31ix.no3deathmatch;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- import org.bukkit.ChatColor;
- import org.bukkit.Server;
- public class ScoreThread implements Runnable {
- public int r = 0;
- public int b = 0;
- Server server = null;
- Thread thread = new Thread(this);
- boolean game = false;
- NO3Deathmatch plugin = null;
- public ScoreThread(NO3Deathmatch plugin) {
- this.server = plugin.getServer();
- }
- public void start() {
- thread.start();
- }
- public void run() {
- if (plugin.gameInProgress)
- {
- server.broadcastMessage(ChatColor.RED+"[RED]: "+ChatColor.WHITE+r+ChatColor.RED+" points");
- server.broadcastMessage(ChatColor.BLUE+"[BLUE]: "+ChatColor.WHITE+b+ChatColor.BLUE+" points");
- }
- try {
- thread.sleep(60000);
- } catch (InterruptedException ex) {
- Logger.getLogger(ScoreThread.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment