Made the restart bar synchronous

This commit is contained in:
Norbi Peti 2016-12-30 19:46:08 +01:00
parent 6a5dda7028
commit b4d4023e9c

View file

@ -36,7 +36,7 @@ public class ScheduledRestartCommand extends TBMCCommandBase {
sender.sendMessage("Scheduled restart in " + ticks / 20f);
ScheduledServerRestartEvent e = new ScheduledServerRestartEvent(ticks);
Bukkit.getPluginManager().callEvent(e);
restarttask = Bukkit.getScheduler().runTaskTimerAsynchronously(MainPlugin.Instance, () -> {
restarttask = Bukkit.getScheduler().runTaskTimer(MainPlugin.Instance, () -> {
if (restartcounter < 0) {
restarttask.cancel();
restartbar.getPlayers().stream().forEach(p -> restartbar.removePlayer(p));