Advertisement
Camer047

Untitled

Dec 2nd, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public boolean onCommand(CommandSender sender, Command cmd, String label,
  2. String[] args) {
  3.  
  4. if (cmd.getName().equalsIgnoreCase("starttimer")) {
  5.  
  6. this.getServer().getScheduler()
  7. .scheduleAsyncRepeatingTask(this, new Runnable() {
  8. public void run() {
  9. if (time != -1) {
  10. if (time != 0) {
  11. Bukkit.getServer().broadcastMessage("" + time);
  12. time--;
  13. } else {
  14.  
  15. Bukkit.broadcastMessage("Time is not equal to 0");
  16. time--;
  17. }
  18. }
  19. }
  20. }, 0L, 80L);
  21.  
  22.  
  23. }
  24. return true;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement