Advertisement
Guest User

Untitled

a guest
May 31st, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public class PixelParkourTimer extends JavaPlugin {
  2.  
  3. @Override
  4. public void onEnable(){
  5.  
  6. }
  7.  
  8. int count = 0;
  9. int every = 20;
  10.  
  11. public boolean onCommand(CommandSender s, Command cmd, String label, String[] args){
  12.  
  13.  
  14.  
  15. if (cmd.getName().equalsIgnoreCase("AB")) {
  16.  
  17. Player player = (Player) s;
  18. Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
  19. public void run() {
  20. ActionBarAPI.sendActionBar(player, ChatColor.AQUA + "Time » " + ChatColor.GREEN + count);
  21. count = count + 1;
  22. }
  23. }, 0, every);
  24. }
  25. return false;
  26.  
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement