3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Just send kick packet + dc players on restart. Don't actually kick them

Dieser Commit ist enthalten in:
md_5 2013-03-28 18:38:42 +11:00
Ursprung fbd6860742
Commit b8cbe00de0
2 geänderte Dateien mit 10 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -1,15 +1,15 @@
From 95dfd8902ffe673d170d5b3218d53c23b7c292f2 Mon Sep 17 00:00:00 2001
From f3e8dba9c5d88017a80d6d39bc79e22ef79cb364 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 12:33:20 +1100
Subject: [PATCH] Watchdog Thread.
---
.../java/net/minecraft/server/MinecraftServer.java | 2 +
src/main/java/org/bukkit/craftbukkit/Spigot.java | 123 +++++++++++++++++----
src/main/java/org/bukkit/craftbukkit/Spigot.java | 124 +++++++++++++++++----
src/main/java/org/spigotmc/RestartCommand.java | 23 ++++
src/main/java/org/spigotmc/WatchdogThread.java | 93 ++++++++++++++++
src/main/resources/configurations/bukkit.yml | 3 +
5 files changed, 222 insertions(+), 22 deletions(-)
5 files changed, 223 insertions(+), 22 deletions(-)
create mode 100644 src/main/java/org/spigotmc/RestartCommand.java
create mode 100644 src/main/java/org/spigotmc/WatchdogThread.java
@ -34,7 +34,7 @@ index 4010cbf..168394f 100644
this.isStopped = true;
} catch (Throwable throwable1) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
index b00c885..d445c2e 100644
index b00c885..ac99395 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -1,5 +1,6 @@
@ -193,7 +193,7 @@ index b00c885..d445c2e 100644
* @param entity
* @return
*/
@@ -265,4 +285,63 @@ public class Spigot {
@@ -265,4 +285,64 @@ public class Spigot {
SpigotTimings.checkIfActiveTimer.stopTiming();
return isActive;
}
@ -207,7 +207,8 @@ index b00c885..d445c2e 100644
+
+ // Kick all players
+ for (EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players) {
+ p.playerConnection.disconnect("Server is restarting");
+ p.playerConnection.networkManager.queue(new Packet255KickDisconnect("Server is restarting"));
+ p.playerConnection.networkManager.d();
+ }
+ // Give the socket a chance to send the packets
+ try {

Datei anzeigen

@ -1,4 +1,4 @@
From 03aae0cc202874295f7350ba9220a2bbb5e5a6ca Mon Sep 17 00:00:00 2001
From 971a01e5898c264e4112de9f66f53c3f77b6ed2a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Feb 2013 11:58:47 -0500
Subject: [PATCH] Entity Tracking Ranges
@ -84,10 +84,10 @@ index 8dd1275..13dc9fa 100644
public Block getBlockAt(int x, int y, int z) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
index d445c2e..3bfd29b 100644
index ac99395..e38f39c 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
@@ -344,4 +344,30 @@ public class Spigot {
@@ -345,4 +345,30 @@ public class Spigot {
ex.printStackTrace();
}
}