Merge branch '784-purgeservice-architecture' of https://github.com/AuthMe-Team/AuthMeReloaded

This commit is contained in:
ljacqu
2016-07-20 21:31:25 +02:00
28 changed files with 553 additions and 292 deletions
@@ -9,6 +9,9 @@ import org.bukkit.OfflinePlayer;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
import javax.inject.Inject;
@@ -123,6 +126,22 @@ public class BukkitService {
return Bukkit.getScheduler().runTaskLaterAsynchronously(authMe, task, delay);
}
/**
* Schedules the given task to repeatedly run until cancelled, starting after the
* specified number of server ticks.
*
* @param task the task to schedule
* @param delay the ticks to wait before running the task
* @param period the ticks to wait between runs
* @return a BukkitTask that contains the id number
* @throws IllegalArgumentException if plugin is null
* @throws IllegalStateException if this was already scheduled
* @see BukkitScheduler#runTaskTimer(Plugin, Runnable, long, long)
*/
public BukkitTask runTaskTimer(BukkitRunnable task, long delay, long period) {
return task.runTaskTimer(authMe, period, delay);
}
/**
* Broadcast a message to all players.
*