Update to Minecraft 1.12-pre6

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-05-30 21:25:59 +10:00
parent f69eb04edc
commit ea6ca4328a
35 changed files with 297 additions and 260 deletions

View File

@@ -294,7 +294,7 @@
+ while (iterator.hasNext()) {
+ entityplayer = (EntityPlayer) iterator.next();
+ savePlayerFile(entityplayer); // CraftBukkit - Force the player's inventory to be saved
+ entityplayer.playerConnection.disconnect("You logged in from another location");
+ entityplayer.playerConnection.disconnect(new ChatMessage("multiplayer.disconnect.duplicate_login", new Object[0]));
+ }
+
+ // Instead of kicking then returning, we need to store the kick reason
@@ -877,7 +877,7 @@
public void u() {
- for (int i = 0; i < this.players.size(); ++i) {
- ((EntityPlayer) this.players.get(i)).playerConnection.disconnect("Server closed");
- ((EntityPlayer) this.players.get(i)).playerConnection.disconnect(new ChatMessage("multiplayer.disconnect.server_shutdown", new Object[0]));
+ // CraftBukkit start - disconnect safely
+ for (EntityPlayer player : this.players) {
+ player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message