3
0

Rollback to the state of .152 build with some critical fixes and updates

This commit is contained in:
Sergey Shatunov
2016-01-04 12:38:37 +07:00
parent 40c95e49c0
commit f722fccdce
38 changed files with 406 additions and 1452 deletions

View File

@ -1,33 +0,0 @@
--- ../src-base/minecraft/org/bukkit/command/defaults/StopCommand.java
+++ ../src-work/minecraft/org/bukkit/command/defaults/StopCommand.java
@@ -12,6 +12,8 @@
import com.google.common.collect.ImmutableList;
+import net.minecraft.server.dedicated.DedicatedServer;
+
public class StopCommand extends VanillaCommand {
public StopCommand() {
super("stop");
@@ -23,16 +25,19 @@
@Override
public boolean execute(CommandSender sender, String currentAlias, String[] args) {
if (!testPermission(sender)) return true;
+
+ DedicatedServer.allowPlayerLogins = false; // KCauldron - immediately disable logins
Command.broadcastCommandMessage(sender, "Stopping the server..");
- Bukkit.shutdown();
String reason = this.createString(args, 0);
if (StringUtils.isNotEmpty(reason)) {
- for (Player player : Bukkit.getOnlinePlayers()) {
+ for (Player player : ImmutableList.copyOf(Bukkit.getOnlinePlayers())) {
player.kickPlayer(reason);
}
}
+
+ Bukkit.shutdown(); // KCauldron - shutdown server after all players kicked
return true;
}