Fixing AFK-Kick resulting in schematics not removed
Dieser Commit ist enthalten in:
Ursprung
ea45eb1942
Commit
64fdf9bf16
@ -2,6 +2,7 @@ package de.steamwar.bausystem.world;
|
|||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
@ -18,7 +19,8 @@ public class AFKStopper implements Listener {
|
|||||||
Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), () -> {
|
Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), () -> {
|
||||||
switch(minutesAfk){
|
switch(minutesAfk){
|
||||||
case 5:
|
case 5:
|
||||||
Bukkit.shutdown();
|
for(Player p : Bukkit.getOnlinePlayers())
|
||||||
|
p.kickPlayer("§cAuf diesem Server ist seit 5 Minuten nichts passiert.");
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
Bukkit.broadcastMessage(afkWarning);
|
Bukkit.broadcastMessage(afkWarning);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren