@Override @Deprecated public BukkitTask runTaskTimer(Plugin plugin, BukkitRunnable task, long delay, long period) throws IllegalArgumentException { return task.runTaskTimer(plugin, delay, period); }
public static void run(Plugin plugin, BukkitRunnable runnable, int delay, int period, boolean async) { if (async) { runnable.runTaskTimerAsynchronously(plugin, delay, period); } else { runnable.runTaskTimer(plugin, delay, period); } }
@Override @Deprecated public int scheduleSyncRepeatingTask(Plugin plugin, BukkitRunnable task, long delay, long period) { return task.runTaskTimer(plugin, delay, period).getTaskId(); }
List<Block> blocks; // The target blocks BukkitRunnable task = new MagmaEffect(blocks); Plugin main; // The unique instance of the main class task.runTaskTimer(main, 0L, 2L);
public MobKillNotifier() { instance = this; cleaner = new BukkitRunnable() { @Override public void run() { entities.clear(); } }; cleaner.runTaskTimer(BetonQuest.getInstance(), 1, 1); }
public synchronized BukkitTask runTaskTimer(Plugin plugin, long delay, long period, T value) throws IllegalArgumentException, IllegalStateException { this.setValue(value); return super.runTaskTimer(plugin, delay, period); }
/** * Begins a BukkitRunnable to check for Collisions. */ public void startCollisionDetection() { this.stopCollisionDetection(); this.detectionRunnable = new BukkitRunnable() { @Override public void run() { CollisionManager.this.detectCollisions(); } }; this.detectionRunnable.runTaskTimer(ProjectKorra.plugin, 0L, this.detectionDelay); }
@Override public void reload(){ // we didn't set anything up in the first place if(sweepDamageCause != null){ return; } if(task != null){ task.cancel(); } task = new BukkitRunnable() { @Override public void run(){ sweepLocations.clear(); } }; task.runTaskTimer(plugin, 0, 1); }
public synchronized BukkitTask runTaskTimer(long delay, long period, T value) throws IllegalArgumentException, IllegalStateException { this.setValue(value); return super.runTaskTimer(MyPetApi.getPlugin(), delay, period); }
private void scheduleRestore(final Player player){ BukkitRunnable removeItem = new BukkitRunnable() { @Override public void run(){ restore(player); } }; removeItem.runTaskLater(plugin, restoreDelay); BukkitRunnable checkBlocking = new BukkitRunnable() { @Override public void run(){ if(!player.isBlocking()){ restore(player); tryCancelTask(player.getUniqueId()); } } }; checkBlocking.runTaskTimer(plugin, 10L, 2L); correspondingTasks.put(player.getUniqueId(), new RunnableSeries(removeItem, checkBlocking)); }
task.runTaskTimer(JavaPlugin.getProvidingPlugin(Teams.class), 0L, 20L);
respawnMe.runTaskTimer(SentinelPlugin.instance, 10, 10);
this.runnable.runTaskTimer(ProjectKorra.plugin, 0, 1); } else { this.runnable = new BukkitRunnable() {
frontdoor = getNewFrontDoor().runTaskTimer(plugin, 20L, FRONTDOOR_INTERVAL);
private void startTimerCountdown() { this.timeLeft = BedwarsRel.getInstance().getMaxLength(); this.length = BedwarsRel.getInstance().getMaxLength(); BukkitRunnable task = new BukkitRunnable() { @Override public void run() { Game.this.updateScoreboardTimer(); if (Game.this.timeLeft == 0) { Game.this.isOver = true; Game.this.getCycle().checkGameOver(); this.cancel(); return; } Game.this.timeLeft--; } }; this.runningTasks.add(task.runTaskTimer(BedwarsRel.getInstance(), 0L, 20L)); }
private void startTimerCountdown() { this.timeLeft = BedwarsRel.getInstance().getMaxLength(); this.length = BedwarsRel.getInstance().getMaxLength(); BukkitRunnable task = new BukkitRunnable() { @Override public void run() { Game.this.updateScoreboardTimer(); if (Game.this.timeLeft == 0) { Game.this.isOver = true; Game.this.getCycle().checkGameOver(); this.cancel(); return; } Game.this.timeLeft--; } }; this.runningTasks.add(task.runTaskTimer(BedwarsRel.getInstance(), 0L, 20L)); }
this.msg.runTaskTimer(ProjectKorra.plugin, 0, 1); } else { new BukkitRunnable() {
task.runTaskTimer(RPGItems.plugin, 0, 3); return PowerResult.ok();
run.runTaskTimer(RPGItems.plugin, 0, 1); return PowerResult.ok();
run.runTaskTimer(RPGItems.plugin, 0, 1); return PowerResult.ok();