h31ix

Untitled

Mar 2nd, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. package net.h31ix.no3deathmatch;
  2.  
  3. import java.util.logging.Level;
  4. import java.util.logging.Logger;
  5. import org.bukkit.ChatColor;
  6. import org.bukkit.Server;
  7.  
  8. public class ScoreThread implements Runnable {
  9.  
  10. public int r = 0;
  11. public int b = 0;
  12. Server server = null;
  13. Thread thread = new Thread(this);
  14. boolean game = false;
  15. NO3Deathmatch plugin = null;
  16.  
  17. public ScoreThread(NO3Deathmatch plugin) {
  18. this.server = plugin.getServer();
  19. }
  20.  
  21. public void start() {
  22. thread.start();
  23. }
  24.  
  25. public void run() {
  26. if (plugin.gameInProgress)
  27. {
  28. server.broadcastMessage(ChatColor.RED+"[RED]: "+ChatColor.WHITE+r+ChatColor.RED+" points");
  29. server.broadcastMessage(ChatColor.BLUE+"[BLUE]: "+ChatColor.WHITE+b+ChatColor.BLUE+" points");
  30. }
  31. try {
  32. thread.sleep(60000);
  33. } catch (InterruptedException ex) {
  34. Logger.getLogger(ScoreThread.class.getName()).log(Level.SEVERE, null, ex);
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment