Lisenochek

Untitled

Sep 10th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. package com.realistic.scoreboard;
  2.  
  3. import org.bukkit.event.EventHandler;
  4. import org.bukkit.event.Listener;
  5. import org.bukkit.event.server.PluginEnableEvent;
  6. import org.bukkit.scheduler.BukkitRunnable;
  7.  
  8. import com.realistic.api.API;
  9.  
  10. public class ScoreBoard_Start implements Listener {
  11.  
  12. private API plugin;
  13.  
  14. public ScoreBoard_Start(API plugin) {
  15. this.plugin = plugin;
  16. }
  17.  
  18. private void Start() {
  19.  
  20. BukkitRunnable run = new BukkitRunnable() {
  21.  
  22. public void run() {
  23.  
  24. ScoreBoard_One.enableScoreboard();
  25. }
  26. };
  27. run.runTaskTimer(plugin, 1, 5);
  28. }
  29.  
  30. @EventHandler
  31. private void Refresh(PluginEnableEvent e) {
  32.  
  33. Start();
  34. }
  35. }
Add Comment
Please, Sign In to add comment