From 64fdf9bf16399f421464a61ee8959a828cf2a991 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 10 Mar 2020 06:33:42 +0100 Subject: [PATCH] Fixing AFK-Kick resulting in schematics not removed --- .../src/de/steamwar/bausystem/world/AFKStopper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/AFKStopper.java b/BauSystem_Main/src/de/steamwar/bausystem/world/AFKStopper.java index b3b7a22..77cb30c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/AFKStopper.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/AFKStopper.java @@ -2,6 +2,7 @@ package de.steamwar.bausystem.world; import de.steamwar.bausystem.BauSystem; import org.bukkit.Bukkit; +import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerMoveEvent; @@ -18,7 +19,8 @@ public class AFKStopper implements Listener { Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), () -> { switch(minutesAfk){ case 5: - Bukkit.shutdown(); + for(Player p : Bukkit.getOnlinePlayers()) + p.kickPlayer("§cAuf diesem Server ist seit 5 Minuten nichts passiert."); break; case 4: Bukkit.broadcastMessage(afkWarning);