geforkt von Mirrors/Paper
b3b04f2ca1
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9a4de097 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of CraftBukkit Changes: f43634ae4 SPIGOT-7170: Cannot set slots in custom smithing inventory 48f3a2258 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of 30e31b4d1 SPIGOT-7177: Certain blocks don't call BlockCanBuildEvent 982364797 SPIGOT-7174: Avoid adding air to CraftMetaBundle Spigot Changes: 6198b5ae PR-122: Add missing parentheses to pumpkin and melon growth modifier 1aec3fc1 Rebuild patches
24 Zeilen
1.3 KiB
Diff
24 Zeilen
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Sun, 2 Jul 2017 21:35:56 -0500
|
|
Subject: [PATCH] Block player logins during server shutdown
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
index 9011b43dbf28f1f19809c1b45898b727d679c12f..187692ea25983195a0fe14a7dc070fd33acb0037 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
@@ -76,6 +76,12 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
|
|
|
@Override
|
|
public void tick() {
|
|
+ // Paper start - Do not allow logins while the server is shutting down
|
|
+ if (!MinecraftServer.getServer().isRunning()) {
|
|
+ this.disconnect(org.bukkit.craftbukkit.util.CraftChatMessage.fromString(org.spigotmc.SpigotConfig.restartMessage)[0]);
|
|
+ return;
|
|
+ }
|
|
+ // Paper end
|
|
if (this.state == ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT) {
|
|
this.handleAcceptedLogin();
|
|
} else if (this.state == ServerLoginPacketListenerImpl.State.DELAY_ACCEPT) {
|