Players get kicked before server shut down

This commit is contained in:
Aplosh 2023-05-22 04:56:56 +01:00
parent 24f259830a
commit 87fe48b871

View File

@ -25,9 +25,6 @@ public class StopCommand extends VanillaCommand {
public boolean execute(CommandSender sender, String currentAlias, String[] args) { public boolean execute(CommandSender sender, String currentAlias, String[] args) {
if (!testPermission(sender)) return true; if (!testPermission(sender)) return true;
Command.broadcastCommandMessage(sender, "Stopping the server..");
Bukkit.shutdown();
String reason = this.createString(args, 0); String reason = this.createString(args, 0);
if (StringUtils.isNotEmpty(reason)) { if (StringUtils.isNotEmpty(reason)) {
for (Player player : Bukkit.getOnlinePlayers()) { for (Player player : Bukkit.getOnlinePlayers()) {
@ -35,6 +32,9 @@ public class StopCommand extends VanillaCommand {
} }
} }
Command.broadcastCommandMessage(sender, "Stopping the server..");
Bukkit.shutdown();
return true; return true;
} }