From ed84749d6e510ecbeef091510d41ca28e57b84bf Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 8 Feb 2013 17:09:51 +1100 Subject: [PATCH] Split TPS patch out correctly. --- CraftBukkit-Patches/0002-Spigot-changes.patch | 21 +++++++++---------- ...te-timeout-time-to-new-default-value.patch | 12 +++++------ .../0019-Add-oreobfuscator-for-Spigot.patch | 6 +++--- ...zation-sleep-for-as-long-as-possible.patch | 17 +++++++++++++-- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/CraftBukkit-Patches/0002-Spigot-changes.patch b/CraftBukkit-Patches/0002-Spigot-changes.patch index 441454f6fe..207ff2823b 100644 --- a/CraftBukkit-Patches/0002-Spigot-changes.patch +++ b/CraftBukkit-Patches/0002-Spigot-changes.patch @@ -1,4 +1,4 @@ -From 66460583cb37502069f54314e886b1ea4477d98c Mon Sep 17 00:00:00 2001 +From 80afd7d84a7d9092281b41183190bff1bc84480e Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 12:21:52 +1100 Subject: [PATCH] Spigot changes. @@ -26,7 +26,7 @@ Subject: [PATCH] Spigot changes. .../java/net/minecraft/server/WorldServer.java | 122 +++++- .../java/org/bukkit/craftbukkit/CraftServer.java | 98 ++++- .../java/org/bukkit/craftbukkit/CraftWorld.java | 76 +++- - src/main/java/org/bukkit/craftbukkit/Spigot.java | 25 ++ + src/main/java/org/bukkit/craftbukkit/Spigot.java | 24 + .../craftbukkit/chunkio/ChunkIOProvider.java | 2 +- .../bukkit/craftbukkit/command/RestartCommand.java | 24 + .../org/bukkit/craftbukkit/entity/CraftPlayer.java | 7 + @@ -39,7 +39,7 @@ Subject: [PATCH] Spigot changes. .../org/bukkit/craftbukkit/util/TimedThread.java | 37 ++ .../bukkit/craftbukkit/util/WatchdogThread.java | 88 ++++ src/main/resources/configurations/bukkit.yml | 30 ++ - 35 files changed, 1361 insertions(+), 100 deletions(-) + 35 files changed, 1360 insertions(+), 100 deletions(-) create mode 100644 src/main/java/org/bukkit/craftbukkit/Spigot.java create mode 100644 src/main/java/org/bukkit/craftbukkit/command/RestartCommand.java create mode 100644 src/main/java/org/bukkit/craftbukkit/util/ExceptionHandler.java @@ -448,7 +448,7 @@ index fac9ea5..43a24f5 100644 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e9f6a6b..b15a1d1 100644 +index b0bb672..b650f55 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -253,7 +253,7 @@ public abstract class PlayerList { @@ -1344,10 +1344,10 @@ index 6e364b1..45217cd 100644 return getChunkAt(x >> 4, z >> 4).getBlock(x & 0xF, y & 0xFF, z & 0xF); diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java new file mode 100644 -index 0000000..9e8b12e +index 0000000..a53c7b0 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -0,0 +1,25 @@ +@@ -0,0 +1,24 @@ +package org.bukkit.craftbukkit; + +import org.bukkit.command.SimpleCommandMap; @@ -1356,7 +1356,6 @@ index 0000000..9e8b12e +public class Spigot { + public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { + commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart")); -+ commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); + + org.bukkit.craftbukkit.util.WatchdogThread.startThread(configuration.getInt("settings.timeout-time", 180), configuration.getBoolean("settings.restart-on-crash", false)); + @@ -1418,7 +1417,7 @@ index 0000000..fba4b4a +} \ No newline at end of file diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b6c7b1c..992131c 100644 +index b0c23a0..747a88e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -212,10 +212,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1441,7 +1440,7 @@ index b6c7b1c..992131c 100644 if (getHandle().playerConnection == null) return; diff --git a/src/main/java/org/bukkit/craftbukkit/util/ExceptionHandler.java b/src/main/java/org/bukkit/craftbukkit/util/ExceptionHandler.java new file mode 100644 -index 0000000..392155e +index 0000000..7ee3665 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/util/ExceptionHandler.java @@ -0,0 +1,31 @@ @@ -1478,7 +1477,7 @@ index 0000000..392155e +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/ExceptionReporter.java b/src/main/java/org/bukkit/craftbukkit/util/ExceptionReporter.java new file mode 100644 -index 0000000..1d0e284 +index 0000000..a396f17 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/util/ExceptionReporter.java @@ -0,0 +1,26 @@ @@ -2176,7 +2175,7 @@ index 0000000..d8d2c7c +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/WatchdogThread.java b/src/main/java/org/bukkit/craftbukkit/util/WatchdogThread.java new file mode 100644 -index 0000000..9e92ea2 +index 0000000..da6df8f --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/util/WatchdogThread.java @@ -0,0 +1,88 @@ diff --git a/CraftBukkit-Patches/0008-Update-timeout-time-to-new-default-value.patch b/CraftBukkit-Patches/0008-Update-timeout-time-to-new-default-value.patch index 004e83d6d2..0a830eb312 100644 --- a/CraftBukkit-Patches/0008-Update-timeout-time-to-new-default-value.patch +++ b/CraftBukkit-Patches/0008-Update-timeout-time-to-new-default-value.patch @@ -1,4 +1,4 @@ -From 80a22dc2c4c0d1f7dddb6f97663a40784b0efef0 Mon Sep 17 00:00:00 2001 +From 266474a8588a30de49a7c2a883dde257b7e001ee Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 10 Jan 2013 12:33:37 +1100 Subject: [PATCH] Update timeout time to new default value. @@ -9,12 +9,12 @@ Subject: [PATCH] Update timeout time to new default value. 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index e11aee4..2b0362a 100644 +index a53c7b0..30bc542 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -8,7 +8,14 @@ public class Spigot { +@@ -7,7 +7,14 @@ public class Spigot { + public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart")); - commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); - org.bukkit.craftbukkit.util.WatchdogThread.startThread(configuration.getInt("settings.timeout-time", 180), configuration.getBoolean("settings.restart-on-crash", false)); + int timeout = configuration.getInt("settings.timeout-time", 300); @@ -29,7 +29,7 @@ index e11aee4..2b0362a 100644 server.whitelistMessage = configuration.getString("settings.whitelist-message", server.whitelistMessage); server.stopMessage = configuration.getString("settings.stop-message", server.stopMessage); diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index e192700..78134f9 100644 +index 5262ae1..55bfb77 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -26,7 +26,7 @@ settings: @@ -42,5 +42,5 @@ index e192700..78134f9 100644 filter-unsafe-ips: false whitelist-message: You are not white-listed on this server! -- -1.8.0.3 +1.8.1-rc2 diff --git a/CraftBukkit-Patches/0019-Add-oreobfuscator-for-Spigot.patch b/CraftBukkit-Patches/0019-Add-oreobfuscator-for-Spigot.patch index 49fb14ac23..17448ad554 100644 --- a/CraftBukkit-Patches/0019-Add-oreobfuscator-for-Spigot.patch +++ b/CraftBukkit-Patches/0019-Add-oreobfuscator-for-Spigot.patch @@ -1,4 +1,4 @@ -From 67d9e120661e24df65c422e743fc1358ae5c4386 Mon Sep 17 00:00:00 2001 +From 7d1bdfd3999b89c9d6e2d0aae359942a1686f3f7 Mon Sep 17 00:00:00 2001 From: lishid Date: Mon, 21 Jan 2013 16:59:04 +1100 Subject: [PATCH] Add oreobfuscator for Spigot. @@ -256,10 +256,10 @@ index 0000000..7178dfb + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index 931356d..83988c3 100644 +index 30bc542..ccb1cc7 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -24,6 +24,10 @@ public class Spigot { +@@ -23,6 +23,10 @@ public class Spigot { server.commandComplete = configuration.getBoolean("settings.command-complete", true); server.spamGuardExclusions = configuration.getStringList("settings.spam-exclusions"); diff --git a/CraftBukkit-Patches/0025-Tick-loop-optimization-sleep-for-as-long-as-possible.patch b/CraftBukkit-Patches/0025-Tick-loop-optimization-sleep-for-as-long-as-possible.patch index 6dd71245aa..8ae6c2d291 100644 --- a/CraftBukkit-Patches/0025-Tick-loop-optimization-sleep-for-as-long-as-possible.patch +++ b/CraftBukkit-Patches/0025-Tick-loop-optimization-sleep-for-as-long-as-possible.patch @@ -1,12 +1,13 @@ -From d2787c0ed42e7c7dc65ecd1568870afa951229db Mon Sep 17 00:00:00 2001 +From 603242f60a45c54c3d8b5ba3190bea68ac8bb53b Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 12:28:17 +1100 Subject: [PATCH] Tick loop optimization - sleep for as long as possible. --- .../java/net/minecraft/server/MinecraftServer.java | 50 +++++++++------------- + src/main/java/org/bukkit/craftbukkit/Spigot.java | 1 + .../craftbukkit/command/TicksPerSecondCommand.java | 35 +++++++++++++++ - 2 files changed, 55 insertions(+), 30 deletions(-) + 3 files changed, 56 insertions(+), 30 deletions(-) create mode 100644 src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -80,6 +81,18 @@ index 955a3ac..99a6cf4 100644 } else { this.a((CrashReport) null); } +diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java +index ccb1cc7..83988c3 100644 +--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java ++++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java +@@ -6,6 +6,7 @@ import org.bukkit.configuration.file.YamlConfiguration; + public class Spigot { + public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { + commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart")); ++ commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); + + int timeout = configuration.getInt("settings.timeout-time", 300); + if (timeout == 180) { diff --git a/src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java b/src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java new file mode 100644 index 0000000..f114a31