Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SotwTask extends BukkitRunnable {
- private int time;
- private int chatInterval;
- public SotwTask(int time, int chatInterval) {
- this.time = time;
- this.chatInterval = chatInterval;
- }
- @Override
- public void run() {
- if(time > 0) {
- if(paused) return;
- if(!ConfigHandler.sotw_timer_on_scoreboard) {
- if(time % chatInterval == 0) {
- sendSotwChatMessage();
- }
- }
- time--;
- } else {
- this.cancel();
- sotwTask = null;
- Message.sendMessage(Lng.PREFIX.toString() + Lng.SOTW_ENDED.toString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement