diff --git a/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch index 625e8519e4..8e4cb87104 100644 --- a/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash. This will help diagnose what was going on in that time before the crash. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index d773ef5b0d..833659bbb2 100644 +index d773ef5b0..833659bbb 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ import org.bukkit.configuration.file.YamlConfiguration; @@ -36,7 +36,7 @@ index d773ef5b0d..833659bbb2 100644 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ea3d9e9afa..9b11fd838b 100644 +index e5b3dc9e2..35cd6f9bf 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 5000L && this.nextTick - this.lastOverloadTime >= 30000L) { // CraftBukkit -- long j = i / 50L; -- -- if (server.getWarnOnOverload()) // CraftBukkit + long i = (curTime = SystemUtils.getMonotonicMillis()) - this.nextTick; + +@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0) { -+ if (catchupTime < 2E6) { -+ wait += Math.abs(catchupTime); -+ } else if (wait < catchupTime) { -+ catchupTime -= wait; -+ wait = 0; -+ } else { -+ wait -= catchupTime; -+ catchupTime = 0; -+ } -+ } -+ if (wait > 0) { -+ Thread.sleep(wait / 1000000); -+ curTime = System.nanoTime(); -+ wait = TICK_TIME - (curTime - lastTick); ++ MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j); + this.nextTick += j * 50L; + this.lastOverloadTime = this.nextTick; } - if ( tickCount++ % SAMPLE_INTERVAL == 0 ) -+ catchupTime = Math.min(MAX_CATCHUP_BUFFER, catchupTime - wait); + if ( ++MinecraftServer.currentTick % SAMPLE_INTERVAL == 0 ) { - double currentTps = 1E3 / ( curTime - tickSection ) * SAMPLE_INTERVAL; @@ -156,16 +138,6 @@ index 2fc8c192b..3a95b0bf8 100644 this.nextTick += 50L; if (this.T) { this.T = false; -@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 9f31f071bb..6bddb27365 100644 +index 9f31f071b..6bddb2736 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -79,7 +79,7 @@ index 9f31f071bb..6bddb27365 100644 this.world.b(this.position, this); if (!this.c.isAir()) { diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 0555bae5aa..452e46cad7 100644 +index 0555bae5a..452e46cad 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -0,0 +0,0 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi diff --git a/Spigot-Server-Patches/Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/Optimize-World-Time-Updates.patch index 24bb7dd5e4..36d9850748 100644 --- a/Spigot-Server-Patches/Optimize-World-Time-Updates.patch +++ b/Spigot-Server-Patches/Optimize-World-Time-Updates.patch @@ -8,7 +8,7 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0a02dece68..1858e956b5 100644 +index 3aa62d13a..e160e72cd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrantorg.apache.maven.plugins diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java new file mode 100644 -index 0000000000..cd6e259239 +index 000000000..cd6e25923 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java @@ -0,0 +0,0 @@ @@ -121,7 +121,7 @@ index 0000000000..cd6e259239 +} diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java new file mode 100644 -index 0000000000..685deaa0e5 +index 000000000..685deaa0e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java @@ -0,0 +0,0 @@ @@ -143,7 +143,7 @@ index 0000000000..685deaa0e5 + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 19e2df3098..3d0cb874d7 100644 +index 19e2df309..3d0cb874d 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -185,7 +185,7 @@ index 19e2df3098..3d0cb874d7 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c117e8fa3f..ffe81205b8 100644 +index 2ccee100e..cdf162a95 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.apache.commons.lang3.Validate; @@ -244,7 +244,7 @@ index c117e8fa3f..ffe81205b8 100644 public KeyPair getKeyPair() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 274e93a25d..9577b537fc 100644 +index 3158197cd..b746e7ad3 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -258,7 +258,7 @@ index 274e93a25d..9577b537fc 100644 this.k = new GameProfileBanList(PlayerList.a); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index abbdb1f64e..69f65eec10 100644 +index 2f349ff3d..a9fe6c51d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import java.util.function.Consumer; @@ -284,7 +284,7 @@ index abbdb1f64e..69f65eec10 100644 @Override public PluginCommand getPluginCommand(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c5d5121fd9..4aebe53f8a 100644 +index c5d5121fd..4aebe53f8 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ import java.util.logging.Logger; @@ -326,7 +326,7 @@ index c5d5121fd9..4aebe53f8a 100644 if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java deleted file mode 100644 -index fdf2f075e2..0000000000 +index fdf2f075e..000000000 --- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java +++ /dev/null @@ -0,0 +0,0 @@ @@ -403,7 +403,7 @@ index fdf2f075e2..0000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java -index befcc19f9b..5510266fb1 100644 +index befcc19f9..5510266fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java @@ -0,0 +0,0 @@ import java.util.Collections; @@ -486,7 +486,7 @@ index befcc19f9b..5510266fb1 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index 70f8d42992..449e99d1b6 100644 +index 70f8d4299..449e99d1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java @@ -0,0 +0,0 @@ public class ServerShutdownThread extends Thread { @@ -500,7 +500,7 @@ index 70f8d42992..449e99d1b6 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java deleted file mode 100644 -index f267f99f96..0000000000 +index f267f99f9..000000000 --- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java +++ /dev/null @@ -0,0 +0,0 @@ @@ -562,7 +562,7 @@ index f267f99f96..0000000000 - } -} diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 490a9acc70..08b6bb7f97 100644 +index 490a9acc7..08b6bb7f9 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch index 90322dce84..a2f9c85697 100644 --- a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 860957c0b1..a3c53d9dbf 100644 +index bf8ca326b..50cf32f41 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import co.aikar.timings.MinecraftTimings; // Paper