From 7f8fbc165b95fbeee914a7fce99ba3b5c3d9e386 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:27:55 +1000 Subject: [PATCH] Move IP filter to own patch and (messily) fix merge conflicts as a result. --- CraftBukkit-Patches/0003-Spigot-Changes.patch | 68 ++------ .../0004-Proxy-IP-Filter.patch | 85 ++++++++++ ...0005-Merge-tweaks-and-configuration.patch} | 4 +- ...weaks.patch => 0006-LongHash-Tweaks.patch} | 2 +- ...ch => 0007-Async-Operation-Catching.patch} | 2 +- ...istance.patch => 0008-View-Distance.patch} | 6 +- ...86-by-firing-the-inventory-close-ev.patch} | 2 +- ...ing-of-NibbleArrays-only-allocate-b.patch} | 2 +- ...-check-to-correctly-resolve-api-ver.patch} | 2 +- ...sed-to-unload-chunks-for-the-client.patch} | 2 +- ...free-but-safe-chunk-reference-cache.patch} | 2 +- ...ation-sleep-for-as-long-as-possible.patch} | 8 +- ...tch => 0015-Improved-Timings-System.patch} | 2 +- ...> 0016-Add-oreobfuscator-for-Spigot.patch} | 12 +- ...es-in-chunks-being-processed-for-th.patch} | 2 +- ...e-and-warn-about-null-tile-entities.patch} | 2 +- ...tch => 0019-Entity-Activation-Range.patch} | 99 ++++++++---- ...the-Metrics-system-to-be-closer-to-.patch} | 34 ++-- ...hread.patch => 0021-Watchdog-Thread.patch} | 146 ++---------------- .../{0021-Netty.patch => 0022-Netty.patch} | 10 +- ...on-itself-instead-of-next-to-bed-Fi.patch} | 2 +- ...-on-CraftPlayer.getBedSpawnLocation.patch} | 2 +- ...-missing-HangingBreakEvent-when-Ent.patch} | 2 +- ...3667-Faux-sleepers-wake-up-normally.patch} | 2 +- ...rong-block-in-BlockDispenseEvent-wh.patch} | 2 +- ...patch => 0028-PlayerItemDamageEvent.patch} | 2 +- ...ch => 0029-Faster-UUID-for-entities.patch} | 2 +- ...ch => 0030-Prevent-NPE-in-CraftSign.patch} | 2 +- ...1-Stage-DataWatcher-WatchableObject.patch} | 2 +- ...atch => 0032-Entity-Tracking-Ranges.patch} | 18 ++- ...rt.patch => 0033-BungeeCord-Support.patch} | 14 +- ...ch => 0034-Texture-Pack-Resolutions.patch} | 10 +- ... => 0035-Limit-Custom-Map-Rendering.patch} | 2 +- ...ption-for-disabled-plugin-tasks.-Fi.patch} | 2 +- ...nt-now-can-return-if-the-click-was-.patch} | 2 +- ...> 0038-Enable-Improved-ping-sending.patch} | 6 +- ...nt-handshake-spam-from-invalid-names.patch | 50 ------ ...nt-handshake-spam-from-invalid-names.patch | 86 +++++++++++ ...col.patch => 0040-Snapshot-Protocol.patch} | 21 +-- ...s-for-randomly-spawned-creatures-to.patch} | 8 +- 40 files changed, 366 insertions(+), 363 deletions(-) create mode 100644 CraftBukkit-Patches/0004-Proxy-IP-Filter.patch rename CraftBukkit-Patches/{0004-Merge-tweaks-and-configuration.patch => 0005-Merge-tweaks-and-configuration.patch} (98%) rename CraftBukkit-Patches/{0005-LongHash-Tweaks.patch => 0006-LongHash-Tweaks.patch} (98%) rename CraftBukkit-Patches/{0006-Async-Operation-Catching.patch => 0007-Async-Operation-Catching.patch} (98%) rename CraftBukkit-Patches/{0007-View-Distance.patch => 0008-View-Distance.patch} (96%) rename CraftBukkit-Patches/{0008-Address-BUKKIT-3286-by-firing-the-inventory-close-ev.patch => 0009-Address-BUKKIT-3286-by-firing-the-inventory-close-ev.patch} (96%) rename CraftBukkit-Patches/{0009-Implement-lightening-of-NibbleArrays-only-allocate-b.patch => 0010-Implement-lightening-of-NibbleArrays-only-allocate-b.patch} (99%) rename CraftBukkit-Patches/{0010-Update-versioning-check-to-correctly-resolve-api-ver.patch => 0011-Update-versioning-check-to-correctly-resolve-api-ver.patch} (93%) rename CraftBukkit-Patches/{0011-Optimize-packet-used-to-unload-chunks-for-the-client.patch => 0012-Optimize-packet-used-to-unload-chunks-for-the-client.patch} (97%) rename CraftBukkit-Patches/{0012-Alternate-sync-free-but-safe-chunk-reference-cache.patch => 0013-Alternate-sync-free-but-safe-chunk-reference-cache.patch} (95%) rename CraftBukkit-Patches/{0013-Tick-loop-optimization-sleep-for-as-long-as-possible.patch => 0014-Tick-loop-optimization-sleep-for-as-long-as-possible.patch} (96%) rename CraftBukkit-Patches/{0014-Improved-Timings-System.patch => 0015-Improved-Timings-System.patch} (99%) rename CraftBukkit-Patches/{0015-Add-oreobfuscator-for-Spigot.patch => 0016-Add-oreobfuscator-for-Spigot.patch} (98%) rename CraftBukkit-Patches/{0016-Only-count-entities-in-chunks-being-processed-for-th.patch => 0017-Only-count-entities-in-chunks-being-processed-for-th.patch} (98%) rename CraftBukkit-Patches/{0017-Detect-remove-and-warn-about-null-tile-entities.patch => 0018-Detect-remove-and-warn-about-null-tile-entities.patch} (94%) rename CraftBukkit-Patches/{0018-Entity-Activation-Range.patch => 0019-Entity-Activation-Range.patch} (85%) rename CraftBukkit-Patches/{0019-Metrics.-Rewrite-the-Metrics-system-to-be-closer-to-.patch => 0020-Metrics.-Rewrite-the-Metrics-system-to-be-closer-to-.patch} (97%) rename CraftBukkit-Patches/{0020-Watchdog-Thread.patch => 0021-Watchdog-Thread.patch} (67%) rename CraftBukkit-Patches/{0021-Netty.patch => 0022-Netty.patch} (99%) rename CraftBukkit-Patches/{0022-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch => 0023-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch} (95%) rename CraftBukkit-Patches/{0023-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch => 0024-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch} (96%) rename CraftBukkit-Patches/{0024-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch => 0025-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch} (96%) rename CraftBukkit-Patches/{0025-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch => 0026-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch} (93%) rename CraftBukkit-Patches/{0026-BUKKIT-3668-Fix-wrong-block-in-BlockDispenseEvent-wh.patch => 0027-BUKKIT-3668-Fix-wrong-block-in-BlockDispenseEvent-wh.patch} (94%) rename CraftBukkit-Patches/{0027-PlayerItemDamageEvent.patch => 0028-PlayerItemDamageEvent.patch} (97%) rename CraftBukkit-Patches/{0028-Faster-UUID-for-entities.patch => 0029-Faster-UUID-for-entities.patch} (93%) rename CraftBukkit-Patches/{0029-Prevent-NPE-in-CraftSign.patch => 0030-Prevent-NPE-in-CraftSign.patch} (96%) rename CraftBukkit-Patches/{0030-Stage-DataWatcher-WatchableObject.patch => 0031-Stage-DataWatcher-WatchableObject.patch} (99%) rename CraftBukkit-Patches/{0031-Entity-Tracking-Ranges.patch => 0032-Entity-Tracking-Ranges.patch} (96%) rename CraftBukkit-Patches/{0032-BungeeCord-Support.patch => 0033-BungeeCord-Support.patch} (89%) rename CraftBukkit-Patches/{0033-Texture-Pack-Resolutions.patch => 0034-Texture-Pack-Resolutions.patch} (93%) rename CraftBukkit-Patches/{0034-Limit-Custom-Map-Rendering.patch => 0035-Limit-Custom-Map-Rendering.patch} (98%) rename CraftBukkit-Patches/{0035-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch => 0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch} (95%) rename CraftBukkit-Patches/{0036-InventoryClickEvent-now-can-return-if-the-click-was-.patch => 0037-InventoryClickEvent-now-can-return-if-the-click-was-.patch} (97%) rename CraftBukkit-Patches/{0037-Enable-Improved-ping-sending.patch => 0038-Enable-Improved-ping-sending.patch} (95%) delete mode 100644 CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch create mode 100644 CraftBukkit-Patches/0039-Prevent-handshake-spam-from-invalid-names.patch rename CraftBukkit-Patches/{0039-Snapshot-Protocol.patch => 0040-Snapshot-Protocol.patch} (95%) rename CraftBukkit-Patches/{0040-Save-entity-counts-for-randomly-spawned-creatures-to.patch => 0041-Save-entity-counts-for-randomly-spawned-creatures-to.patch} (91%) diff --git a/CraftBukkit-Patches/0003-Spigot-Changes.patch b/CraftBukkit-Patches/0003-Spigot-Changes.patch index 12713d46c7..180188a877 100644 --- a/CraftBukkit-Patches/0003-Spigot-Changes.patch +++ b/CraftBukkit-Patches/0003-Spigot-Changes.patch @@ -1,9 +1,8 @@ -From a11f742a5953cb082dea3d72f7b324aefdd7b3f7 Mon Sep 17 00:00:00 2001 +From 7218beba91a88a416da41d317a18909ab8a5cefd Mon Sep 17 00:00:00 2001 From: md_5 -Date: Sat, 23 Mar 2013 17:57:27 +1100 +Date: Tue, 23 Apr 2013 11:17:36 +1000 Subject: [PATCH] Spigot Changes -The set of changes which provide core Spigot functionality, which would otherwise be a mess to try and apply individually. diff --git a/.gitignore b/.gitignore index c3faf57..346b232 100644 @@ -333,38 +332,6 @@ index ed670d9..da7ad33 100644 } } -diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java -index 0686ba0..c185f64 100644 ---- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java -+++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java -@@ -28,6 +28,27 @@ class ThreadLoginVerifier extends Thread { - - public void run() { - try { -+ // Spigot start -+ if (((CraftServer) org.bukkit.Bukkit.getServer()).ipFilter) { -+ try { -+ String ip = this.pendingConnection.getSocket().getInetAddress().getHostAddress(); -+ String[] split = ip.split("\\."); -+ StringBuilder lookup = new StringBuilder(); -+ for (int i = split.length - 1; i >= 0; i--) { -+ lookup.append(split[i]); -+ lookup.append("."); -+ } -+ if (!ip.contains("127.0.0.1")) { -+ lookup.append("xbl.spamhaus.org."); -+ if (java.net.InetAddress.getByName(lookup.toString()) != null) { -+ pendingConnection.disconnect("Your IP address (" + ip + ") is flagged as unsafe by spamhaus.org/xbl"); -+ return; -+ } -+ } -+ } catch (Exception ex) { -+ } -+ } -+ // Spigot end - String s = (new BigInteger(MinecraftEncryption.a(PendingConnection.a(this.pendingConnection), PendingConnection.b(this.pendingConnection).F().getPublic(), PendingConnection.c(this.pendingConnection)))).toString(16); - URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(PendingConnection.d(this.pendingConnection), "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8")); - BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream())); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index d896f69..a77f48d 100644 --- a/src/main/java/net/minecraft/server/World.java @@ -634,7 +601,7 @@ index 6d8495f..0b7ac47 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8a079d3..e7c3a0c 100644 +index 8a079d3..e5ceed1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -145,7 +145,7 @@ public final class CraftServer implements Server { @@ -646,7 +613,7 @@ index 8a079d3..e7c3a0c 100644 private final Yaml yaml = new Yaml(new SafeConstructor()); private final Map offlinePlayers = new MapMaker().softValues().makeMap(); private final AutoUpdater updater; -@@ -166,6 +166,14 @@ public final class CraftServer implements Server { +@@ -166,6 +166,13 @@ public final class CraftServer implements Server { private final class BooleanWrapper { private boolean value = true; } @@ -654,14 +621,13 @@ index 8a079d3..e7c3a0c 100644 + public String whitelistMessage = "You are not white-listed on this server!"; + public String stopMessage = "Server restarting. Brb"; + public boolean logCommands = true; -+ public boolean ipFilter = false; + public boolean commandComplete = true; + public List spamGuardExclusions; + // Spigot end static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); -@@ -208,12 +216,20 @@ public final class CraftServer implements Server { +@@ -208,12 +215,20 @@ public final class CraftServer implements Server { chunkGCLoadThresh = configuration.getInt("chunk-gc.load-threshold"); updater = new AutoUpdater(new BukkitDLUpdaterService(configuration.getString("auto-updater.host")), getLogger(), configuration.getString("auto-updater.preferred-channel")); @@ -683,7 +649,7 @@ index 8a079d3..e7c3a0c 100644 loadPlugins(); enablePlugins(PluginLoadOrder.STARTUP); } -@@ -222,7 +238,7 @@ public final class CraftServer implements Server { +@@ -222,7 +237,7 @@ public final class CraftServer implements Server { return (File) console.options.valueOf("bukkit-settings"); } @@ -692,7 +658,7 @@ index 8a079d3..e7c3a0c 100644 try { configuration.save(getConfigFile()); } catch (IOException ex) { -@@ -535,6 +551,7 @@ public final class CraftServer implements Server { +@@ -535,6 +550,7 @@ public final class CraftServer implements Server { ((DedicatedServer) console).propertyManager = config; @@ -700,7 +666,7 @@ index 8a079d3..e7c3a0c 100644 boolean animals = config.getBoolean("spawn-animals", console.getSpawnAnimals()); boolean monsters = config.getBoolean("spawn-monsters", console.worlds.get(0).difficulty > 0); int difficulty = config.getInt("difficulty", console.worlds.get(0).difficulty); -@@ -600,6 +617,7 @@ public final class CraftServer implements Server { +@@ -600,6 +616,7 @@ public final class CraftServer implements Server { "This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin" )); } @@ -708,7 +674,7 @@ index 8a079d3..e7c3a0c 100644 loadPlugins(); enablePlugins(PluginLoadOrder.STARTUP); enablePlugins(PluginLoadOrder.POSTWORLD); -@@ -1055,13 +1073,8 @@ public final class CraftServer implements Server { +@@ -1055,13 +1072,8 @@ public final class CraftServer implements Server { return count; } @@ -723,7 +689,7 @@ index 8a079d3..e7c3a0c 100644 OfflinePlayer result = getPlayerExact(name); String lname = name.toLowerCase(); -@@ -1069,17 +1082,7 @@ public final class CraftServer implements Server { +@@ -1069,17 +1081,7 @@ public final class CraftServer implements Server { result = offlinePlayers.get(lname); if (result == null) { @@ -742,7 +708,7 @@ index 8a079d3..e7c3a0c 100644 result = new CraftOfflinePlayer(this, name); offlinePlayers.put(lname, result); } -@@ -1217,7 +1220,7 @@ public final class CraftServer implements Server { +@@ -1217,7 +1219,7 @@ public final class CraftServer implements Server { Set players = new HashSet(); for (String file : files) { @@ -751,7 +717,7 @@ index 8a079d3..e7c3a0c 100644 } players.addAll(Arrays.asList(getOnlinePlayers())); -@@ -1323,7 +1326,7 @@ public final class CraftServer implements Server { +@@ -1323,7 +1325,7 @@ public final class CraftServer implements Server { public List tabCompleteCommand(Player player, String message) { List completions = null; try { @@ -844,10 +810,10 @@ index b5a68af..9da842e 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..4a4f949 +index 0000000..2cd806e --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -0,0 +1,20 @@ +@@ -0,0 +1,19 @@ +package org.bukkit.craftbukkit; + +import org.bukkit.command.SimpleCommandMap; @@ -859,7 +825,6 @@ index 0000000..4a4f949 + server.whitelistMessage = configuration.getString("settings.whitelist-message", server.whitelistMessage); + server.stopMessage = configuration.getString("settings.stop-message", server.stopMessage); + server.logCommands = configuration.getBoolean("settings.log-commands", true); -+ server.ipFilter = configuration.getBoolean("settings.filter-unsafe-ips", false); + server.commandComplete = configuration.getBoolean("settings.command-complete", true); + server.spamGuardExclusions = configuration.getStringList("settings.spam-exclusions"); + @@ -882,14 +847,13 @@ index c896ba2..e99cb22 100644 } diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 61a95e3..bc00ad4 100644 +index 61a95e3..f2ce75e 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml -@@ -25,6 +25,32 @@ settings: +@@ -25,6 +25,31 @@ settings: query-plugins: true deprecated-verbose: default shutdown-message: Server closed -+ filter-unsafe-ips: false + whitelist-message: You are not white-listed on this server! + log-commands: true + command-complete: true diff --git a/CraftBukkit-Patches/0004-Proxy-IP-Filter.patch b/CraftBukkit-Patches/0004-Proxy-IP-Filter.patch new file mode 100644 index 0000000000..2482ffd5cd --- /dev/null +++ b/CraftBukkit-Patches/0004-Proxy-IP-Filter.patch @@ -0,0 +1,85 @@ +From 5877b5f20080c1630241b6ab62c94bc6dfa7a44a Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Tue, 23 Apr 2013 11:22:07 +1000 +Subject: [PATCH] Proxy IP Filter + + +diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java +index 0686ba0..9ed3db5 100644 +--- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java ++++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java +@@ -28,6 +28,7 @@ class ThreadLoginVerifier extends Thread { + + public void run() { + try { ++ org.bukkit.craftbukkit.Spigot.filterIp(pendingConnection); // Spigot + String s = (new BigInteger(MinecraftEncryption.a(PendingConnection.a(this.pendingConnection), PendingConnection.b(this.pendingConnection).F().getPublic(), PendingConnection.c(this.pendingConnection)))).toString(16); + URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(PendingConnection.d(this.pendingConnection), "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8")); + BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream())); +diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java +index 2cd806e..82dc5c8 100644 +--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java ++++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java +@@ -1,19 +1,47 @@ + package org.bukkit.craftbukkit; + ++import java.net.InetAddress; ++import net.minecraft.server.PendingConnection; + import org.bukkit.command.SimpleCommandMap; + import org.bukkit.configuration.file.YamlConfiguration; + + public class Spigot { + ++ private static boolean filterIps; ++ + public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { + server.whitelistMessage = configuration.getString("settings.whitelist-message", server.whitelistMessage); + server.stopMessage = configuration.getString("settings.stop-message", server.stopMessage); + server.logCommands = configuration.getBoolean("settings.log-commands", true); + server.commandComplete = configuration.getBoolean("settings.command-complete", true); + server.spamGuardExclusions = configuration.getStringList("settings.spam-exclusions"); ++ filterIps = configuration.getBoolean("settings.filter-unsafe-ips", false); + + if (server.chunkGCPeriod == 0) { + server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!"); + } + } ++ ++ public static void filterIp(PendingConnection con) { ++ if (filterIps) { ++ try { ++ InetAddress address = con.getSocket().getInetAddress(); ++ String ip = address.getHostAddress(); ++ ++ if (!address.isLoopbackAddress()) { ++ String[] split = ip.split("\\."); ++ StringBuilder lookup = new StringBuilder(); ++ for (int i = split.length - 1; i >= 0; i--) { ++ lookup.append(split[i]); ++ lookup.append("."); ++ } ++ lookup.append("xbl.spamhaus.org."); ++ if (InetAddress.getByName(lookup.toString()) != null) { ++ con.disconnect("Your IP address (" + ip + ") is flagged as unsafe by spamhaus.org/xbl"); ++ } ++ } ++ } catch (Exception ex) { ++ } ++ } ++ } + } +diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml +index f2ce75e..b7c0376 100644 +--- a/src/main/resources/configurations/bukkit.yml ++++ b/src/main/resources/configurations/bukkit.yml +@@ -30,6 +30,7 @@ settings: + command-complete: true + spam-exclusions: + - /skill ++ filter-unsafe-ips: false + world-settings: + default: + growth-chunks-per-tick: 650 +-- +1.8.2.1 + diff --git a/CraftBukkit-Patches/0004-Merge-tweaks-and-configuration.patch b/CraftBukkit-Patches/0005-Merge-tweaks-and-configuration.patch similarity index 98% rename from CraftBukkit-Patches/0004-Merge-tweaks-and-configuration.patch rename to CraftBukkit-Patches/0005-Merge-tweaks-and-configuration.patch index 9463895b28..2533eabacb 100644 --- a/CraftBukkit-Patches/0004-Merge-tweaks-and-configuration.patch +++ b/CraftBukkit-Patches/0005-Merge-tweaks-and-configuration.patch @@ -1,4 +1,4 @@ -From 02a200167495100ba6a4178eed5e586bb6ab33ac Mon Sep 17 00:00:00 2001 +From e5030bb8e88d57428375af160227ad56bde7b2f3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:46:33 +1100 Subject: [PATCH] Merge tweaks and configuration @@ -100,7 +100,7 @@ index 9da842e..a303090 100644 public int wheatGrowthModifier = 100; public int cactusGrowthModifier = 100; diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index bc00ad4..524c0ca 100644 +index b7c0376..92241d9 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -37,6 +37,8 @@ world-settings: diff --git a/CraftBukkit-Patches/0005-LongHash-Tweaks.patch b/CraftBukkit-Patches/0006-LongHash-Tweaks.patch similarity index 98% rename from CraftBukkit-Patches/0005-LongHash-Tweaks.patch rename to CraftBukkit-Patches/0006-LongHash-Tweaks.patch index bc9b6fa6cc..d4b29b6a69 100644 --- a/CraftBukkit-Patches/0005-LongHash-Tweaks.patch +++ b/CraftBukkit-Patches/0006-LongHash-Tweaks.patch @@ -1,4 +1,4 @@ -From 898ceae38bdfae77816b9f79e433ad97a8dac4b5 Mon Sep 17 00:00:00 2001 +From e452f4069bf9976655a2c6710d9b9cd28e2d016b Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:29:43 +1100 Subject: [PATCH] LongHash Tweaks. diff --git a/CraftBukkit-Patches/0006-Async-Operation-Catching.patch b/CraftBukkit-Patches/0007-Async-Operation-Catching.patch similarity index 98% rename from CraftBukkit-Patches/0006-Async-Operation-Catching.patch rename to CraftBukkit-Patches/0007-Async-Operation-Catching.patch index f29d37b264..8a6843fef3 100644 --- a/CraftBukkit-Patches/0006-Async-Operation-Catching.patch +++ b/CraftBukkit-Patches/0007-Async-Operation-Catching.patch @@ -1,4 +1,4 @@ -From e7fda7fe893f59f61e809a0bcd2552a9d67941e7 Mon Sep 17 00:00:00 2001 +From a7ba30126f1319ecf227bf7b83384c7c77494ea6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 7 Mar 2013 20:12:46 +1100 Subject: [PATCH] Async Operation Catching diff --git a/CraftBukkit-Patches/0007-View-Distance.patch b/CraftBukkit-Patches/0008-View-Distance.patch similarity index 96% rename from CraftBukkit-Patches/0007-View-Distance.patch rename to CraftBukkit-Patches/0008-View-Distance.patch index 7305d85649..241f7da390 100644 --- a/CraftBukkit-Patches/0007-View-Distance.patch +++ b/CraftBukkit-Patches/0008-View-Distance.patch @@ -1,4 +1,4 @@ -From fbc59e7f362ffa16606bdb94bbaa765bf84b05c6 Mon Sep 17 00:00:00 2001 +From dccf82f4ad3c6c477e07464c5f47e75e2cc73661 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:52:41 +1100 Subject: [PATCH] View Distance @@ -19,7 +19,7 @@ index 0dfd190..c543bed 100644 } else { this.e = i; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a5a0e04..f63e364 100644 +index 0b7ac47..a25cbf3 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -51,7 +51,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate @@ -62,7 +62,7 @@ index f5e63f8..7c48dad 100644 public int wheatGrowthModifier = 100; public int cactusGrowthModifier = 100; diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 524c0ca..9b85e13 100644 +index 92241d9..10ef7f2 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -50,6 +50,7 @@ world-settings: diff --git a/CraftBukkit-Patches/0008-Address-BUKKIT-3286-by-firing-the-inventory-close-ev.patch b/CraftBukkit-Patches/0009-Address-BUKKIT-3286-by-firing-the-inventory-close-ev.patch similarity index 96% rename from CraftBukkit-Patches/0008-Address-BUKKIT-3286-by-firing-the-inventory-close-ev.patch rename to CraftBukkit-Patches/0009-Address-BUKKIT-3286-by-firing-the-inventory-close-ev.patch index b71674ca70..e92ef000a8 100644 --- a/CraftBukkit-Patches/0008-Address-BUKKIT-3286-by-firing-the-inventory-close-ev.patch +++ b/CraftBukkit-Patches/0009-Address-BUKKIT-3286-by-firing-the-inventory-close-ev.patch @@ -1,4 +1,4 @@ -From 47193857bccf2fe37af174ee5ae61607138d6758 Mon Sep 17 00:00:00 2001 +From b310fa74d48b5a1f347cfbe393f5eb0ea1f14a0e Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 23 Dec 2012 17:09:40 +1100 Subject: [PATCH] Address BUKKIT-3286 by firing the inventory close event when diff --git a/CraftBukkit-Patches/0009-Implement-lightening-of-NibbleArrays-only-allocate-b.patch b/CraftBukkit-Patches/0010-Implement-lightening-of-NibbleArrays-only-allocate-b.patch similarity index 99% rename from CraftBukkit-Patches/0009-Implement-lightening-of-NibbleArrays-only-allocate-b.patch rename to CraftBukkit-Patches/0010-Implement-lightening-of-NibbleArrays-only-allocate-b.patch index 15bb4ff4a0..d02e570a41 100644 --- a/CraftBukkit-Patches/0009-Implement-lightening-of-NibbleArrays-only-allocate-b.patch +++ b/CraftBukkit-Patches/0010-Implement-lightening-of-NibbleArrays-only-allocate-b.patch @@ -1,4 +1,4 @@ -From 77baca153ffa630c0d3075f9f38d0768b1a72c70 Mon Sep 17 00:00:00 2001 +From d84c1f7342f30987a074d105d4d8ba1a510cbfcf Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sun, 13 Jan 2013 03:49:07 -0800 Subject: [PATCH] Implement 'lightening' of NibbleArrays - only allocate diff --git a/CraftBukkit-Patches/0010-Update-versioning-check-to-correctly-resolve-api-ver.patch b/CraftBukkit-Patches/0011-Update-versioning-check-to-correctly-resolve-api-ver.patch similarity index 93% rename from CraftBukkit-Patches/0010-Update-versioning-check-to-correctly-resolve-api-ver.patch rename to CraftBukkit-Patches/0011-Update-versioning-check-to-correctly-resolve-api-ver.patch index b797422d83..143e0c2ed9 100644 --- a/CraftBukkit-Patches/0010-Update-versioning-check-to-correctly-resolve-api-ver.patch +++ b/CraftBukkit-Patches/0011-Update-versioning-check-to-correctly-resolve-api-ver.patch @@ -1,4 +1,4 @@ -From 5bacc90f15903a28fe329fee89c920d51ea9585e Mon Sep 17 00:00:00 2001 +From 7866a2f38c32cab403554e122670e7c44b97dd14 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 15 Jan 2013 15:05:02 +1100 Subject: [PATCH] Update versioning check to correctly resolve api version. diff --git a/CraftBukkit-Patches/0011-Optimize-packet-used-to-unload-chunks-for-the-client.patch b/CraftBukkit-Patches/0012-Optimize-packet-used-to-unload-chunks-for-the-client.patch similarity index 97% rename from CraftBukkit-Patches/0011-Optimize-packet-used-to-unload-chunks-for-the-client.patch rename to CraftBukkit-Patches/0012-Optimize-packet-used-to-unload-chunks-for-the-client.patch index 620dadc8f5..50476d3bd4 100644 --- a/CraftBukkit-Patches/0011-Optimize-packet-used-to-unload-chunks-for-the-client.patch +++ b/CraftBukkit-Patches/0012-Optimize-packet-used-to-unload-chunks-for-the-client.patch @@ -1,4 +1,4 @@ -From 2faa51280c0e87153593785c54976e699ae612b2 Mon Sep 17 00:00:00 2001 +From 2fbf5ea63022a8ee60fd687af6b8526fa4e0a759 Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Fri, 18 Jan 2013 16:20:01 +0500 Subject: [PATCH] Optimize packet used to unload chunks for the client diff --git a/CraftBukkit-Patches/0012-Alternate-sync-free-but-safe-chunk-reference-cache.patch b/CraftBukkit-Patches/0013-Alternate-sync-free-but-safe-chunk-reference-cache.patch similarity index 95% rename from CraftBukkit-Patches/0012-Alternate-sync-free-but-safe-chunk-reference-cache.patch rename to CraftBukkit-Patches/0013-Alternate-sync-free-but-safe-chunk-reference-cache.patch index 2cf4697832..a41289fe96 100644 --- a/CraftBukkit-Patches/0012-Alternate-sync-free-but-safe-chunk-reference-cache.patch +++ b/CraftBukkit-Patches/0013-Alternate-sync-free-but-safe-chunk-reference-cache.patch @@ -1,4 +1,4 @@ -From 13a6bd378bcbf0f58a931b4bc6a24fb3f12b1ff7 Mon Sep 17 00:00:00 2001 +From e5359d2e13ff1b81e120159a27421894c77aec33 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Wed, 16 Jan 2013 15:27:22 -0600 Subject: [PATCH] Alternate, sync-free-but-safe chunk reference cache diff --git a/CraftBukkit-Patches/0013-Tick-loop-optimization-sleep-for-as-long-as-possible.patch b/CraftBukkit-Patches/0014-Tick-loop-optimization-sleep-for-as-long-as-possible.patch similarity index 96% rename from CraftBukkit-Patches/0013-Tick-loop-optimization-sleep-for-as-long-as-possible.patch rename to CraftBukkit-Patches/0014-Tick-loop-optimization-sleep-for-as-long-as-possible.patch index a7b79039bf..00f2b34910 100644 --- a/CraftBukkit-Patches/0013-Tick-loop-optimization-sleep-for-as-long-as-possible.patch +++ b/CraftBukkit-Patches/0014-Tick-loop-optimization-sleep-for-as-long-as-possible.patch @@ -1,4 +1,4 @@ -From 6503e881c0b5c4ebb28137f25052520d985cf78d Mon Sep 17 00:00:00 2001 +From 4414321e46640b3a33eb118b48589bc2eadd1c56 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. @@ -76,11 +76,11 @@ index 3ee8ddc..8cc26b8 100644 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 4a4f949..db46037 100644 +index 82dc5c8..b64a7ca 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -6,6 +6,8 @@ import org.bukkit.configuration.file.YamlConfiguration; - public class Spigot { +@@ -10,6 +10,8 @@ public class Spigot { + private static boolean filterIps; public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { + commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); diff --git a/CraftBukkit-Patches/0014-Improved-Timings-System.patch b/CraftBukkit-Patches/0015-Improved-Timings-System.patch similarity index 99% rename from CraftBukkit-Patches/0014-Improved-Timings-System.patch rename to CraftBukkit-Patches/0015-Improved-Timings-System.patch index 79a666e9d5..506f3daeeb 100644 --- a/CraftBukkit-Patches/0014-Improved-Timings-System.patch +++ b/CraftBukkit-Patches/0015-Improved-Timings-System.patch @@ -1,4 +1,4 @@ -From bd0ceaaf0d67618c4c036b436b3fc73caa2b9117 Mon Sep 17 00:00:00 2001 +From 043b7b77e70022138dcdbaefbd09238b74423fd5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 10 Jan 2013 00:18:11 -0500 Subject: [PATCH] Improved Timings System diff --git a/CraftBukkit-Patches/0015-Add-oreobfuscator-for-Spigot.patch b/CraftBukkit-Patches/0016-Add-oreobfuscator-for-Spigot.patch similarity index 98% rename from CraftBukkit-Patches/0015-Add-oreobfuscator-for-Spigot.patch rename to CraftBukkit-Patches/0016-Add-oreobfuscator-for-Spigot.patch index 2316c913b7..914fcd6d72 100644 --- a/CraftBukkit-Patches/0015-Add-oreobfuscator-for-Spigot.patch +++ b/CraftBukkit-Patches/0016-Add-oreobfuscator-for-Spigot.patch @@ -1,4 +1,4 @@ -From 46308289f49df1c88bda07ee40adbefef3451a03 Mon Sep 17 00:00:00 2001 +From bd36fd8224840874eee255240a95d5838d910737 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 10:58:17 +1100 Subject: [PATCH] Add oreobfuscator for Spigot. @@ -150,7 +150,7 @@ index d03174b..354d4f6 100644 if (false) { // Never trigger diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e7c3a0c..9f2be37 100644 +index e5ceed1..20d38b4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -163,6 +163,13 @@ public final class CraftServer implements Server { @@ -197,12 +197,12 @@ index 7c48dad..77078a1 100644 public int wheatGrowthModifier = 100; public int cactusGrowthModifier = 100; diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index db46037..4097568 100644 +index b64a7ca..58361fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -15,6 +15,15 @@ public class Spigot { - server.commandComplete = configuration.getBoolean("settings.command-complete", true); +@@ -19,6 +19,15 @@ public class Spigot { server.spamGuardExclusions = configuration.getStringList("settings.spam-exclusions"); + filterIps = configuration.getBoolean("settings.filter-unsafe-ips", false); + server.orebfuscatorEnabled = configuration.getBoolean("orebfuscator.enable", false); + server.orebfuscatorEngineMode = configuration.getInt("orebfuscator.engine-mode", 1); @@ -369,7 +369,7 @@ index 0000000..be9233c + } +} diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 9b85e13..a63dc22 100644 +index 10ef7f2..9f6c57d 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -82,3 +82,10 @@ database: diff --git a/CraftBukkit-Patches/0016-Only-count-entities-in-chunks-being-processed-for-th.patch b/CraftBukkit-Patches/0017-Only-count-entities-in-chunks-being-processed-for-th.patch similarity index 98% rename from CraftBukkit-Patches/0016-Only-count-entities-in-chunks-being-processed-for-th.patch rename to CraftBukkit-Patches/0017-Only-count-entities-in-chunks-being-processed-for-th.patch index d89c892d20..a1d00d16b6 100644 --- a/CraftBukkit-Patches/0016-Only-count-entities-in-chunks-being-processed-for-th.patch +++ b/CraftBukkit-Patches/0017-Only-count-entities-in-chunks-being-processed-for-th.patch @@ -1,4 +1,4 @@ -From 9b80ec89a6c650410da797ad30fd6f6343d465a2 Mon Sep 17 00:00:00 2001 +From ea8ea5f1b16431f18c66b0ee3fb30fc3cc90d442 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 29 Jan 2013 13:25:53 -0500 Subject: [PATCH] Only count entities in chunks being processed for the spawn diff --git a/CraftBukkit-Patches/0017-Detect-remove-and-warn-about-null-tile-entities.patch b/CraftBukkit-Patches/0018-Detect-remove-and-warn-about-null-tile-entities.patch similarity index 94% rename from CraftBukkit-Patches/0017-Detect-remove-and-warn-about-null-tile-entities.patch rename to CraftBukkit-Patches/0018-Detect-remove-and-warn-about-null-tile-entities.patch index a402878e6f..0aad93a2c9 100644 --- a/CraftBukkit-Patches/0017-Detect-remove-and-warn-about-null-tile-entities.patch +++ b/CraftBukkit-Patches/0018-Detect-remove-and-warn-about-null-tile-entities.patch @@ -1,4 +1,4 @@ -From 7ef5bb91f4c0ec4a310324d37dabe63b7a660efa Mon Sep 17 00:00:00 2001 +From 7e8c83b9090d0750ea37cdd370904bee216dbb73 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 09:20:19 +1100 Subject: [PATCH] Detect, remove and warn about null tile entities. diff --git a/CraftBukkit-Patches/0018-Entity-Activation-Range.patch b/CraftBukkit-Patches/0019-Entity-Activation-Range.patch similarity index 85% rename from CraftBukkit-Patches/0018-Entity-Activation-Range.patch rename to CraftBukkit-Patches/0019-Entity-Activation-Range.patch index 4be39972be..d38c121621 100644 --- a/CraftBukkit-Patches/0018-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0019-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From d7aa3a0abf7b11f6036f6df089f2ca23cf65b8ee Mon Sep 17 00:00:00 2001 +From 9e00228efc4dd48b96d8c686fa8d9872ecc4e06b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -148,28 +148,61 @@ index 77078a1..6a0f02c 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 4097568..705daef 100644 +index 58361fa..61cd44d 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -1,9 +1,17 @@ +@@ -1,12 +1,43 @@ package org.bukkit.craftbukkit; + import java.net.InetAddress; +import java.util.ArrayList; -+import net.minecraft.server.*; ++import java.util.List; ++import net.minecraft.server.AxisAlignedBB; ++import net.minecraft.server.Chunk; ++import net.minecraft.server.Entity; ++import net.minecraft.server.EntityAmbient; ++import net.minecraft.server.EntityAnimal; ++import net.minecraft.server.EntityArrow; ++import net.minecraft.server.EntityComplexPart; ++import net.minecraft.server.EntityCreature; ++import net.minecraft.server.EntityEnderCrystal; ++import net.minecraft.server.EntityEnderDragon; ++import net.minecraft.server.EntityFireball; ++import net.minecraft.server.EntityFireworks; ++import net.minecraft.server.EntityHuman; ++import net.minecraft.server.EntityItemFrame; ++import net.minecraft.server.EntityLiving; ++import net.minecraft.server.EntityMonster; ++import net.minecraft.server.EntityProjectile; ++import net.minecraft.server.EntitySheep; ++import net.minecraft.server.EntitySlime; ++import net.minecraft.server.EntityTNTPrimed; ++import net.minecraft.server.EntityWeather; ++import net.minecraft.server.EntityWither; ++import net.minecraft.server.MathHelper; ++import net.minecraft.server.MinecraftServer; + import net.minecraft.server.PendingConnection; ++import net.minecraft.server.World; import org.bukkit.command.SimpleCommandMap; import org.bukkit.configuration.file.YamlConfiguration; -+import java.util.List; -+ public class Spigot { -+ static AxisAlignedBB maxBB = AxisAlignedBB.a(0,0,0,0,0,0); -+ static AxisAlignedBB miscBB = AxisAlignedBB.a(0,0,0,0,0,0); -+ static AxisAlignedBB animalBB = AxisAlignedBB.a(0,0,0,0,0,0); -+ static AxisAlignedBB monsterBB = AxisAlignedBB.a(0,0,0,0,0,0); + ++ static AxisAlignedBB maxBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); ++ static AxisAlignedBB miscBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); ++ static AxisAlignedBB animalBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); ++ static AxisAlignedBB monsterBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); + private static boolean filterIps; public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { - commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); -@@ -27,5 +35,216 @@ public class Spigot { +@@ -25,12 +56,228 @@ public class Spigot { + server.orebfuscatorDisabledWorlds = configuration.getStringList("orebfuscator.disabled-worlds"); + server.orebfuscatorBlocks = configuration.getShortList("orebfuscator.blocks"); + if (server.orebfuscatorEngineMode != 1 && server.orebfuscatorEngineMode != 2) { +- server.orebfuscatorEngineMode = 1; ++ server.orebfuscatorEngineMode = 1; + } + if (server.chunkGCPeriod == 0) { server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!"); } @@ -179,6 +212,7 @@ index 4097568..705daef 100644 + /** + * Initializes an entities type on construction to specify what group this + * entity is in for activation ranges. ++ * + * @param entity + * @return group id + */ @@ -200,21 +234,20 @@ index 4097568..705daef 100644 + * @return boolean If it should always tick. + */ + public static boolean initializeEntityActivationState(Entity entity, CraftWorld world) { -+ if ( (entity.activationType == 3 && world.miscEntityActivationRange == 0) -+ || (entity.activationType == 2 && world.animalEntityActivationRange == 0) -+ || (entity.activationType == 1 && world.monsterEntityActivationRange == 0) -+ || entity instanceof EntityHuman -+ || entity instanceof EntityItemFrame -+ || entity instanceof EntityProjectile -+ || entity instanceof EntityEnderDragon -+ || entity instanceof EntityComplexPart -+ || entity instanceof EntityWither -+ || entity instanceof EntityFireball -+ || entity instanceof EntityWeather -+ || entity instanceof EntityTNTPrimed -+ || entity instanceof EntityEnderCrystal -+ || entity instanceof EntityFireworks -+ ) { ++ if ((entity.activationType == 3 && world.miscEntityActivationRange == 0) ++ || (entity.activationType == 2 && world.animalEntityActivationRange == 0) ++ || (entity.activationType == 1 && world.monsterEntityActivationRange == 0) ++ || entity instanceof EntityHuman ++ || entity instanceof EntityItemFrame ++ || entity instanceof EntityProjectile ++ || entity instanceof EntityEnderDragon ++ || entity instanceof EntityComplexPart ++ || entity instanceof EntityWither ++ || entity instanceof EntityFireball ++ || entity instanceof EntityWeather ++ || entity instanceof EntityTNTPrimed ++ || entity instanceof EntityEnderCrystal ++ || entity instanceof EntityFireworks) { + return true; + } + @@ -224,6 +257,7 @@ index 4097568..705daef 100644 + /** + * Utility method to grow an AABB without creating a new AABB or touching + * the pool, so we can re-use ones we have. ++ * + * @param target + * @param source + * @param x @@ -242,6 +276,7 @@ index 4097568..705daef 100644 + /** + * Find what entities are in range of the players in the world and set + * active if in range. ++ * + * @param world + */ + public static void activateEntities(World world) { @@ -280,6 +315,7 @@ index 4097568..705daef 100644 + + /** + * Checks for the activation state of all entities in this chunk. ++ * + * @param chunk + */ + private static void activateChunkEntities(Chunk chunk) { @@ -315,6 +351,7 @@ index 4097568..705daef 100644 + /** + * If an entity is not in range, do some more checks to see if we should + * give it a shot. ++ * + * @param entity + * @return + */ @@ -325,7 +362,7 @@ index 4097568..705daef 100644 + } + if (!(entity instanceof EntityArrow)) { + if (!entity.onGround || entity.passenger != null -+ || entity.vehicle != null) { ++ || entity.vehicle != null) { + return true; + } + } else if (!((EntityArrow) entity).inGround) { @@ -355,6 +392,7 @@ index 4097568..705daef 100644 + + /** + * Checks if the entity is active for this tick. ++ * + * @param entity + * @return + */ @@ -385,7 +423,8 @@ index 4097568..705daef 100644 + SpigotTimings.checkIfActiveTimer.stopTiming(); + return isActive; } - } + + public static void filterIp(PendingConnection con) { diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java index bbb6368..d8f73ad 100644 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java @@ -401,7 +440,7 @@ index bbb6368..d8f73ad 100644 public static final HashMap tileEntityTypeTimingMap = new HashMap(); public static final HashMap pluginTaskTimingMap = new HashMap(); diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index a63dc22..5822e41 100644 +index 9f6c57d..655ee24 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -46,6 +46,9 @@ world-settings: diff --git a/CraftBukkit-Patches/0019-Metrics.-Rewrite-the-Metrics-system-to-be-closer-to-.patch b/CraftBukkit-Patches/0020-Metrics.-Rewrite-the-Metrics-system-to-be-closer-to-.patch similarity index 97% rename from CraftBukkit-Patches/0019-Metrics.-Rewrite-the-Metrics-system-to-be-closer-to-.patch rename to CraftBukkit-Patches/0020-Metrics.-Rewrite-the-Metrics-system-to-be-closer-to-.patch index 69b9338608..33d8080523 100644 --- a/CraftBukkit-Patches/0019-Metrics.-Rewrite-the-Metrics-system-to-be-closer-to-.patch +++ b/CraftBukkit-Patches/0020-Metrics.-Rewrite-the-Metrics-system-to-be-closer-to-.patch @@ -1,4 +1,4 @@ -From d8270e405d6e2043dad5fb6f4a1f36ef7c51e41c Mon Sep 17 00:00:00 2001 +From 8a10704aa2e70c5d9d461c892a930dd3ddd6320e Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 08:58:35 +1100 Subject: [PATCH] Metrics. Rewrite the Metrics system to be closer to the @@ -6,37 +6,41 @@ Subject: [PATCH] Metrics. Rewrite the Metrics system to be closer to the diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index 705daef..b00c885 100644 +index 61cd44d..88c2383 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -1,11 +1,16 @@ +@@ -1,8 +1,10 @@ package org.bukkit.craftbukkit; +import java.io.IOException; + import java.net.InetAddress; import java.util.ArrayList; - import net.minecraft.server.*; - import org.bukkit.command.SimpleCommandMap; - import org.bukkit.configuration.file.YamlConfiguration; - import java.util.List; +import java.util.logging.Level; -+import java.util.logging.Logger; + import net.minecraft.server.AxisAlignedBB; + import net.minecraft.server.Chunk; + import net.minecraft.server.Entity; +@@ -29,8 +31,10 @@ import net.minecraft.server.MathHelper; + import net.minecraft.server.MinecraftServer; + import net.minecraft.server.PendingConnection; + import net.minecraft.server.World; +import org.bukkit.Bukkit; + import org.bukkit.command.SimpleCommandMap; + import org.bukkit.configuration.file.YamlConfiguration; +import org.spigotmc.Metrics; public class Spigot { - static AxisAlignedBB maxBB = AxisAlignedBB.a(0,0,0,0,0,0); -@@ -13,6 +18,9 @@ public class Spigot { - static AxisAlignedBB animalBB = AxisAlignedBB.a(0,0,0,0,0,0); - static AxisAlignedBB monsterBB = AxisAlignedBB.a(0,0,0,0,0,0); +@@ -39,6 +43,8 @@ public class Spigot { + static AxisAlignedBB animalBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); + static AxisAlignedBB monsterBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); + private static boolean filterIps; + public static boolean tabPing = false; + private static Metrics metrics; -+ + public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); - -@@ -36,6 +44,16 @@ public class Spigot { +@@ -63,6 +69,16 @@ public class Spigot { server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!"); } diff --git a/CraftBukkit-Patches/0020-Watchdog-Thread.patch b/CraftBukkit-Patches/0021-Watchdog-Thread.patch similarity index 67% rename from CraftBukkit-Patches/0020-Watchdog-Thread.patch rename to CraftBukkit-Patches/0021-Watchdog-Thread.patch index 654c8ef113..614c379c61 100644 --- a/CraftBukkit-Patches/0020-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0021-Watchdog-Thread.patch @@ -1,4 +1,4 @@ -From 85e57c9394fd6836472234348869e009579eba3f Mon Sep 17 00:00:00 2001 +From cc9da81376725d3f41e4b9d7bbdc3147130573d7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 12:33:20 +1100 Subject: [PATCH] Watchdog Thread. @@ -25,7 +25,7 @@ index 0205822..65a4e9f 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..ac99395 100644 +index 88c2383..ea2b688 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java @@ -1,5 +1,6 @@ @@ -33,31 +33,18 @@ index b00c885..ac99395 100644 +import java.io.File; import java.io.IOException; + import java.net.InetAddress; import java.util.ArrayList; - import net.minecraft.server.*; -@@ -8,21 +9,24 @@ import org.bukkit.configuration.file.YamlConfiguration; - - import java.util.List; - import java.util.logging.Level; --import java.util.logging.Logger; -+import net.minecraft.server.EntityPlayer; - import org.bukkit.Bukkit; +@@ -35,6 +36,8 @@ import org.bukkit.Bukkit; + import org.bukkit.command.SimpleCommandMap; + import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.Metrics; +import org.spigotmc.RestartCommand; +import org.spigotmc.WatchdogThread; public class Spigot { -- static AxisAlignedBB maxBB = AxisAlignedBB.a(0,0,0,0,0,0); -- static AxisAlignedBB miscBB = AxisAlignedBB.a(0,0,0,0,0,0); -- static AxisAlignedBB animalBB = AxisAlignedBB.a(0,0,0,0,0,0); -- static AxisAlignedBB monsterBB = AxisAlignedBB.a(0,0,0,0,0,0); -+ static AxisAlignedBB maxBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); -+ static AxisAlignedBB miscBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); -+ static AxisAlignedBB animalBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); -+ static AxisAlignedBB monsterBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); - public static boolean tabPing = false; - private static Metrics metrics; +@@ -48,6 +51,7 @@ public class Spigot { public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); @@ -65,9 +52,9 @@ index b00c885..ac99395 100644 server.whitelistMessage = configuration.getString("settings.whitelist-message", server.whitelistMessage); server.stopMessage = configuration.getString("settings.stop-message", server.stopMessage); -@@ -31,13 +35,24 @@ public class Spigot { - server.commandComplete = configuration.getBoolean("settings.command-complete", true); +@@ -56,6 +60,17 @@ public class Spigot { server.spamGuardExclusions = configuration.getStringList("settings.spam-exclusions"); + filterIps = configuration.getBoolean("settings.filter-unsafe-ips", false); + int configVersion = configuration.getInt("config-version"); + switch (configVersion) { @@ -83,112 +70,10 @@ index b00c885..ac99395 100644 server.orebfuscatorEnabled = configuration.getBoolean("orebfuscator.enable", false); server.orebfuscatorEngineMode = configuration.getInt("orebfuscator.engine-mode", 1); server.orebfuscatorUpdateRadius = configuration.getInt("orebfuscator.update-radius", 2); - server.orebfuscatorDisabledWorlds = configuration.getStringList("orebfuscator.disabled-worlds"); - server.orebfuscatorBlocks = configuration.getShortList("orebfuscator.blocks"); - if (server.orebfuscatorEngineMode != 1 && server.orebfuscatorEngineMode != 2) { -- server.orebfuscatorEngineMode = 1; -+ server.orebfuscatorEngineMode = 1; - } - - if (server.chunkGCPeriod == 0) { -@@ -59,6 +74,7 @@ public class Spigot { - /** - * Initializes an entities type on construction to specify what group this - * entity is in for activation ranges. -+ * - * @param entity - * @return group id - */ -@@ -80,21 +96,20 @@ public class Spigot { - * @return boolean If it should always tick. - */ - public static boolean initializeEntityActivationState(Entity entity, CraftWorld world) { -- if ( (entity.activationType == 3 && world.miscEntityActivationRange == 0) -- || (entity.activationType == 2 && world.animalEntityActivationRange == 0) -- || (entity.activationType == 1 && world.monsterEntityActivationRange == 0) -- || entity instanceof EntityHuman -- || entity instanceof EntityItemFrame -- || entity instanceof EntityProjectile -- || entity instanceof EntityEnderDragon -- || entity instanceof EntityComplexPart -- || entity instanceof EntityWither -- || entity instanceof EntityFireball -- || entity instanceof EntityWeather -- || entity instanceof EntityTNTPrimed -- || entity instanceof EntityEnderCrystal -- || entity instanceof EntityFireworks -- ) { -+ if ((entity.activationType == 3 && world.miscEntityActivationRange == 0) -+ || (entity.activationType == 2 && world.animalEntityActivationRange == 0) -+ || (entity.activationType == 1 && world.monsterEntityActivationRange == 0) -+ || entity instanceof EntityHuman -+ || entity instanceof EntityItemFrame -+ || entity instanceof EntityProjectile -+ || entity instanceof EntityEnderDragon -+ || entity instanceof EntityComplexPart -+ || entity instanceof EntityWither -+ || entity instanceof EntityFireball -+ || entity instanceof EntityWeather -+ || entity instanceof EntityTNTPrimed -+ || entity instanceof EntityEnderCrystal -+ || entity instanceof EntityFireworks) { - return true; - } - -@@ -104,6 +119,7 @@ public class Spigot { - /** - * Utility method to grow an AABB without creating a new AABB or touching - * the pool, so we can re-use ones we have. -+ * - * @param target - * @param source - * @param x -@@ -122,6 +138,7 @@ public class Spigot { - /** - * Find what entities are in range of the players in the world and set - * active if in range. -+ * - * @param world - */ - public static void activateEntities(World world) { -@@ -160,6 +177,7 @@ public class Spigot { - - /** - * Checks for the activation state of all entities in this chunk. -+ * - * @param chunk - */ - private static void activateChunkEntities(Chunk chunk) { -@@ -195,6 +213,7 @@ public class Spigot { - /** - * If an entity is not in range, do some more checks to see if we should - * give it a shot. -+ * - * @param entity - * @return - */ -@@ -205,7 +224,7 @@ public class Spigot { - } - if (!(entity instanceof EntityArrow)) { - if (!entity.onGround || entity.passenger != null -- || entity.vehicle != null) { -+ || entity.vehicle != null) { - return true; - } - } else if (!((EntityArrow) entity).inGround) { -@@ -235,6 +254,7 @@ public class Spigot { - - /** - * Checks if the entity is active for this tick. -+ * - * @param entity - * @return - */ -@@ -265,4 +285,64 @@ public class Spigot { - SpigotTimings.checkIfActiveTimer.stopTiming(); +@@ -296,6 +311,66 @@ public class Spigot { return isActive; } -+ + + public static void restart() { + try { + String startupScript = MinecraftServer.getServer().server.configuration.getString("settings.restart-script-location", ""); @@ -248,7 +133,10 @@ index b00c885..ac99395 100644 + ex.printStackTrace(); + } + } - } ++ + public static void filterIp(PendingConnection con) { + if (filterIps) { + try { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java new file mode 100644 index 0000000..2d5c89f @@ -378,13 +266,13 @@ index 0000000..10390b8 + } +} diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 5822e41..a62ba24 100644 +index 655ee24..7a6c12f 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -31,6 +31,9 @@ settings: - command-complete: true spam-exclusions: - /skill + filter-unsafe-ips: false + timeout-time: 30 + restart-on-crash: false + restart-script-location: /path/to/server/start.sh diff --git a/CraftBukkit-Patches/0021-Netty.patch b/CraftBukkit-Patches/0022-Netty.patch similarity index 99% rename from CraftBukkit-Patches/0021-Netty.patch rename to CraftBukkit-Patches/0022-Netty.patch index 7723ae830f..c75f06b814 100644 --- a/CraftBukkit-Patches/0021-Netty.patch +++ b/CraftBukkit-Patches/0022-Netty.patch @@ -1,4 +1,4 @@ -From efe9a9aecb849b6886372c7d9445cd79dd706687 Mon Sep 17 00:00:00 2001 +From 937cd2af62e9aba06ca928808b954a967b39e70b Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 Apr 2013 17:44:39 +1000 Subject: [PATCH] Netty @@ -226,7 +226,7 @@ index 489e184..9533b6f 100644 } diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java -index c185f64..abe0b81 100644 +index 9ed3db5..a2a4458 100644 --- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java +++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java @@ -21,6 +21,7 @@ class ThreadLoginVerifier extends Thread { @@ -238,7 +238,7 @@ index c185f64..abe0b81 100644 // CraftBukkit end this.pendingConnection = pendingconnection; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9f2be37..c7a804b 100644 +index 20d38b4..a85d0c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -129,6 +129,7 @@ import com.avaje.ebean.config.dbplatform.SQLitePlatform; @@ -249,7 +249,7 @@ index 9f2be37..c7a804b 100644 import jline.console.ConsoleReader; -@@ -1373,4 +1374,20 @@ public final class CraftServer implements Server { +@@ -1372,4 +1373,20 @@ public final class CraftServer implements Server { public CraftScoreboardManager getScoreboardManager() { return scoreboardManager; } @@ -1352,7 +1352,7 @@ index 0000000..5dc3754 + DATA; +} diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index a62ba24..aaf9454 100644 +index 7a6c12f..558a3e2 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -12,7 +12,9 @@ diff --git a/CraftBukkit-Patches/0022-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch b/CraftBukkit-Patches/0023-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch similarity index 95% rename from CraftBukkit-Patches/0022-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch rename to CraftBukkit-Patches/0023-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch index 5654c72b8a..b3b73125c0 100644 --- a/CraftBukkit-Patches/0022-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch +++ b/CraftBukkit-Patches/0023-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch @@ -1,4 +1,4 @@ -From a047d8e7dc875f19d0f3ee688fe6fc5ad8193145 Mon Sep 17 00:00:00 2001 +From 03871ddf1b79ab43caa4794c84db09148d02250f Mon Sep 17 00:00:00 2001 From: EdGruberman Date: Fri, 22 Feb 2013 09:23:51 -0700 Subject: [PATCH] Return bed location itself instead of next to bed; Fixes diff --git a/CraftBukkit-Patches/0023-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch b/CraftBukkit-Patches/0024-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch similarity index 96% rename from CraftBukkit-Patches/0023-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch rename to CraftBukkit-Patches/0024-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch index 6f4dbb3e2d..1f2118d8b2 100644 --- a/CraftBukkit-Patches/0023-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch +++ b/CraftBukkit-Patches/0024-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch @@ -1,4 +1,4 @@ -From 4303e73f545b5775d7c509517c22e4603c58939b Mon Sep 17 00:00:00 2001 +From 61fea458560bf9212ba6e67385ff7988972c04c4 Mon Sep 17 00:00:00 2001 From: EdGruberman Date: Tue, 12 Feb 2013 16:17:31 -0700 Subject: [PATCH] Remove dependency on CraftPlayer.getBedSpawnLocation; Fixes diff --git a/CraftBukkit-Patches/0024-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch b/CraftBukkit-Patches/0025-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch similarity index 96% rename from CraftBukkit-Patches/0024-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch rename to CraftBukkit-Patches/0025-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch index 69930f37b8..94ccaedbdd 100644 --- a/CraftBukkit-Patches/0024-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch +++ b/CraftBukkit-Patches/0025-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch @@ -1,4 +1,4 @@ -From cf1b7384d76a69a1a5a634c4296c8fd8b577e79a Mon Sep 17 00:00:00 2001 +From 1ca8c2db44c9b9dd34db2ac5f36dfaf894b2e0d2 Mon Sep 17 00:00:00 2001 From: Yariv Livay Date: Sat, 2 Mar 2013 09:36:52 +1100 Subject: [PATCH] BUKKIT-3661, fixed missing HangingBreakEvent when diff --git a/CraftBukkit-Patches/0025-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch b/CraftBukkit-Patches/0026-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch similarity index 93% rename from CraftBukkit-Patches/0025-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch rename to CraftBukkit-Patches/0026-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch index 65707dff95..06f26b7a70 100644 --- a/CraftBukkit-Patches/0025-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch +++ b/CraftBukkit-Patches/0026-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch @@ -1,4 +1,4 @@ -From 018bb0e330b933b689c5c0b5298d7d9dc2e05e16 Mon Sep 17 00:00:00 2001 +From 50f01906623941eca95bf53adbb7e38de68fbd76 Mon Sep 17 00:00:00 2001 From: Yariv Livay Date: Mon, 25 Feb 2013 22:26:36 +0200 Subject: [PATCH] Adds BUKKIT-3667, Faux sleepers wake up normally diff --git a/CraftBukkit-Patches/0026-BUKKIT-3668-Fix-wrong-block-in-BlockDispenseEvent-wh.patch b/CraftBukkit-Patches/0027-BUKKIT-3668-Fix-wrong-block-in-BlockDispenseEvent-wh.patch similarity index 94% rename from CraftBukkit-Patches/0026-BUKKIT-3668-Fix-wrong-block-in-BlockDispenseEvent-wh.patch rename to CraftBukkit-Patches/0027-BUKKIT-3668-Fix-wrong-block-in-BlockDispenseEvent-wh.patch index d92d44ad03..591df7b251 100644 --- a/CraftBukkit-Patches/0026-BUKKIT-3668-Fix-wrong-block-in-BlockDispenseEvent-wh.patch +++ b/CraftBukkit-Patches/0027-BUKKIT-3668-Fix-wrong-block-in-BlockDispenseEvent-wh.patch @@ -1,4 +1,4 @@ -From d46e66fbc50efab32a73d1abcb7dffbf1e997dc1 Mon Sep 17 00:00:00 2001 +From 963f766cb076e6a8983faaa3a14124369bb5cec7 Mon Sep 17 00:00:00 2001 From: Yariv Livay Date: Tue, 26 Feb 2013 20:14:34 +0200 Subject: [PATCH] BUKKIT-3668 Fix wrong block in BlockDispenseEvent when diff --git a/CraftBukkit-Patches/0027-PlayerItemDamageEvent.patch b/CraftBukkit-Patches/0028-PlayerItemDamageEvent.patch similarity index 97% rename from CraftBukkit-Patches/0027-PlayerItemDamageEvent.patch rename to CraftBukkit-Patches/0028-PlayerItemDamageEvent.patch index f1c733949b..e4be96f754 100644 --- a/CraftBukkit-Patches/0027-PlayerItemDamageEvent.patch +++ b/CraftBukkit-Patches/0028-PlayerItemDamageEvent.patch @@ -1,4 +1,4 @@ -From df2a38b74c31766bf1784fc509e0fbc4b7dd7183 Mon Sep 17 00:00:00 2001 +From 069d3b19905fa584a623b36024b5cedadab38718 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 4 Mar 2013 18:45:52 +1100 Subject: [PATCH] PlayerItemDamageEvent diff --git a/CraftBukkit-Patches/0028-Faster-UUID-for-entities.patch b/CraftBukkit-Patches/0029-Faster-UUID-for-entities.patch similarity index 93% rename from CraftBukkit-Patches/0028-Faster-UUID-for-entities.patch rename to CraftBukkit-Patches/0029-Faster-UUID-for-entities.patch index 5715a180b1..4f293fe047 100644 --- a/CraftBukkit-Patches/0028-Faster-UUID-for-entities.patch +++ b/CraftBukkit-Patches/0029-Faster-UUID-for-entities.patch @@ -1,4 +1,4 @@ -From 1e3e9706d697ebe09bdd3fbcce39f16f216f48fd Mon Sep 17 00:00:00 2001 +From 2b65267bd33de765abe59d7c47e6e7431eea888c Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 17 Mar 2013 19:02:50 +1100 Subject: [PATCH] Faster UUID for entities diff --git a/CraftBukkit-Patches/0029-Prevent-NPE-in-CraftSign.patch b/CraftBukkit-Patches/0030-Prevent-NPE-in-CraftSign.patch similarity index 96% rename from CraftBukkit-Patches/0029-Prevent-NPE-in-CraftSign.patch rename to CraftBukkit-Patches/0030-Prevent-NPE-in-CraftSign.patch index f87251df0c..57c8e0008f 100644 --- a/CraftBukkit-Patches/0029-Prevent-NPE-in-CraftSign.patch +++ b/CraftBukkit-Patches/0030-Prevent-NPE-in-CraftSign.patch @@ -1,4 +1,4 @@ -From 8fa12a2dc27cf3f73af9301b2e20beaa5d438be9 Mon Sep 17 00:00:00 2001 +From 856c80c7445ba24d8b55291fa8f7c9dae9dec58b Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 18 Mar 2013 20:01:44 +1100 Subject: [PATCH] Prevent NPE in CraftSign diff --git a/CraftBukkit-Patches/0030-Stage-DataWatcher-WatchableObject.patch b/CraftBukkit-Patches/0031-Stage-DataWatcher-WatchableObject.patch similarity index 99% rename from CraftBukkit-Patches/0030-Stage-DataWatcher-WatchableObject.patch rename to CraftBukkit-Patches/0031-Stage-DataWatcher-WatchableObject.patch index f1b21768ec..3d11701274 100644 --- a/CraftBukkit-Patches/0030-Stage-DataWatcher-WatchableObject.patch +++ b/CraftBukkit-Patches/0031-Stage-DataWatcher-WatchableObject.patch @@ -1,4 +1,4 @@ -From cfe8787acc0173429ec9073be61aeb073c462bb0 Mon Sep 17 00:00:00 2001 +From 529c96426506d0211e28f6251ddfc705392936fe Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 21 Mar 2013 17:00:54 +1100 Subject: [PATCH] Stage DataWatcher & WatchableObject. diff --git a/CraftBukkit-Patches/0031-Entity-Tracking-Ranges.patch b/CraftBukkit-Patches/0032-Entity-Tracking-Ranges.patch similarity index 96% rename from CraftBukkit-Patches/0031-Entity-Tracking-Ranges.patch rename to CraftBukkit-Patches/0032-Entity-Tracking-Ranges.patch index e720f641df..e28fdf91f9 100644 --- a/CraftBukkit-Patches/0031-Entity-Tracking-Ranges.patch +++ b/CraftBukkit-Patches/0032-Entity-Tracking-Ranges.patch @@ -1,4 +1,4 @@ -From bdf18ad7a72f75bbc88c511f3751cce86371c531 Mon Sep 17 00:00:00 2001 +From 603cd06ab23bd22aaec57f52cafdb62757f528b9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Feb 2013 11:58:47 -0500 Subject: [PATCH] Entity Tracking Ranges @@ -24,7 +24,7 @@ index d7efe3e..f6f1ab0 100644 i = this.d; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8dd1275..13dc9fa 100644 +index 6a0f02c..cfd7fee 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -107,6 +107,12 @@ public class CraftWorld implements World { @@ -78,14 +78,13 @@ 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 ac99395..92259e5 100644 +index ea2b688..435358f 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -345,4 +345,30 @@ public class Spigot { - ex.printStackTrace(); +@@ -371,6 +371,32 @@ public class Spigot { } } -+ + + /** + * Gets the range an entity should be 'tracked' by players and visible in the client. + * @param entity @@ -111,9 +110,12 @@ index ac99395..92259e5 100644 + } + return Math.min(world.maxTrackingRange, range); + } - } ++ + public static void filterIp(PendingConnection con) { + if (filterIps) { + try { diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index aaf9454..3009855 100644 +index 558a3e2..746b8d9 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -54,6 +54,11 @@ world-settings: diff --git a/CraftBukkit-Patches/0032-BungeeCord-Support.patch b/CraftBukkit-Patches/0033-BungeeCord-Support.patch similarity index 89% rename from CraftBukkit-Patches/0032-BungeeCord-Support.patch rename to CraftBukkit-Patches/0033-BungeeCord-Support.patch index 97fbf715fc..c3a720bf8a 100644 --- a/CraftBukkit-Patches/0032-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0033-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From 6ffd3b72af6c8be496157f3902f61e66d406372e Mon Sep 17 00:00:00 2001 +From 64db4568e3569988cd08a4e671a05f98b59763a9 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -6,7 +6,7 @@ Subject: [PATCH] BungeeCord Support - Allows BungeeCord to set the players real IP address very early in the login process, so that the BungeeCord proxy IP is never even seen by a plugin. diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java -index 71e4739..27cf4e3 100644 +index 836ad94..72fb172 100644 --- a/src/main/java/net/minecraft/server/PendingConnection.java +++ b/src/main/java/net/minecraft/server/PendingConnection.java @@ -221,4 +221,17 @@ public class PendingConnection extends Connection { @@ -28,18 +28,18 @@ index 71e4739..27cf4e3 100644 + // Spigot end } diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index 92259e5..b5953ce 100644 +index 435358f..e7917a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -23,6 +23,7 @@ public class Spigot { - static AxisAlignedBB monsterBB = AxisAlignedBB.a(0, 0, 0, 0, 0, 0); +@@ -48,6 +48,7 @@ public class Spigot { + private static boolean filterIps; public static boolean tabPing = false; private static Metrics metrics; + public static List bungeeIPs; public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); -@@ -60,6 +61,7 @@ public class Spigot { +@@ -85,6 +86,7 @@ public class Spigot { } tabPing = configuration.getBoolean("settings.tab-ping", tabPing); @@ -48,7 +48,7 @@ index 92259e5..b5953ce 100644 if (metrics == null) { try { diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 3009855..f1ceb44 100644 +index 746b8d9..bc8f4e2 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -36,6 +36,8 @@ settings: diff --git a/CraftBukkit-Patches/0033-Texture-Pack-Resolutions.patch b/CraftBukkit-Patches/0034-Texture-Pack-Resolutions.patch similarity index 93% rename from CraftBukkit-Patches/0033-Texture-Pack-Resolutions.patch rename to CraftBukkit-Patches/0034-Texture-Pack-Resolutions.patch index 3fe75cfee8..dce8fef562 100644 --- a/CraftBukkit-Patches/0033-Texture-Pack-Resolutions.patch +++ b/CraftBukkit-Patches/0034-Texture-Pack-Resolutions.patch @@ -1,4 +1,4 @@ -From 62ef56febec405b4b44edf69f88b91928110af56 Mon Sep 17 00:00:00 2001 +From 37ac86f0ff79bbfac1afc367b4e99ba681915ff3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 13:04:45 +1100 Subject: [PATCH] Texture Pack Resolutions @@ -19,10 +19,10 @@ index 65a4e9f..a1d77ad 100644 public abstract boolean T(); diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index b5953ce..504bd8b 100644 +index e7917a3..490553b 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -24,6 +24,7 @@ public class Spigot { +@@ -49,6 +49,7 @@ public class Spigot { public static boolean tabPing = false; private static Metrics metrics; public static List bungeeIPs; @@ -30,7 +30,7 @@ index b5953ce..504bd8b 100644 public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); -@@ -62,6 +63,7 @@ public class Spigot { +@@ -87,6 +88,7 @@ public class Spigot { tabPing = configuration.getBoolean("settings.tab-ping", tabPing); bungeeIPs = configuration.getStringList("settings.bungee-proxies"); @@ -52,7 +52,7 @@ index 0b5ea21..f959fdf 100644 getHandle().playerConnection.sendPacket(new Packet250CustomPayload("MC|TPack", message)); diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index f1ceb44..80b4feb 100644 +index bc8f4e2..6d8cf5f 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -38,6 +38,7 @@ settings: diff --git a/CraftBukkit-Patches/0034-Limit-Custom-Map-Rendering.patch b/CraftBukkit-Patches/0035-Limit-Custom-Map-Rendering.patch similarity index 98% rename from CraftBukkit-Patches/0034-Limit-Custom-Map-Rendering.patch rename to CraftBukkit-Patches/0035-Limit-Custom-Map-Rendering.patch index 6aa64b8584..cd1cacd640 100644 --- a/CraftBukkit-Patches/0034-Limit-Custom-Map-Rendering.patch +++ b/CraftBukkit-Patches/0035-Limit-Custom-Map-Rendering.patch @@ -1,4 +1,4 @@ -From ae9813ce3e68ed2d9904a7fefdceba2658653c34 Mon Sep 17 00:00:00 2001 +From 7a602b1febd624f603ac40391b3f4d8126f09134 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 19:08:41 +1100 Subject: [PATCH] Limit Custom Map Rendering diff --git a/CraftBukkit-Patches/0035-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch b/CraftBukkit-Patches/0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch similarity index 95% rename from CraftBukkit-Patches/0035-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch rename to CraftBukkit-Patches/0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch index 1560520c1b..ff4a75a615 100644 --- a/CraftBukkit-Patches/0035-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch +++ b/CraftBukkit-Patches/0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch @@ -1,4 +1,4 @@ -From a7ba4b95b993d6899c54a6c8feaf3a323f431fc0 Mon Sep 17 00:00:00 2001 +From 2b34f5139b1dbb3c389a3eb525bc83124e911985 Mon Sep 17 00:00:00 2001 From: Hudson Date: Wed, 3 Apr 2013 02:16:56 -0500 Subject: [PATCH] Revert "Throw exception for disabled plugin tasks. Fixes diff --git a/CraftBukkit-Patches/0036-InventoryClickEvent-now-can-return-if-the-click-was-.patch b/CraftBukkit-Patches/0037-InventoryClickEvent-now-can-return-if-the-click-was-.patch similarity index 97% rename from CraftBukkit-Patches/0036-InventoryClickEvent-now-can-return-if-the-click-was-.patch rename to CraftBukkit-Patches/0037-InventoryClickEvent-now-can-return-if-the-click-was-.patch index 0103bb8711..27096394bf 100644 --- a/CraftBukkit-Patches/0036-InventoryClickEvent-now-can-return-if-the-click-was-.patch +++ b/CraftBukkit-Patches/0037-InventoryClickEvent-now-can-return-if-the-click-was-.patch @@ -1,4 +1,4 @@ -From 15ddd3d3d17362781a04ecd5a95f1e414368a463 Mon Sep 17 00:00:00 2001 +From abac44df8b621da4a7cbb7fbbbebd6a48918a782 Mon Sep 17 00:00:00 2001 From: Tyler Blair Date: Tue, 9 Apr 2013 17:55:15 -0300 Subject: [PATCH] InventoryClickEvent now can return if the click was a double diff --git a/CraftBukkit-Patches/0037-Enable-Improved-ping-sending.patch b/CraftBukkit-Patches/0038-Enable-Improved-ping-sending.patch similarity index 95% rename from CraftBukkit-Patches/0037-Enable-Improved-ping-sending.patch rename to CraftBukkit-Patches/0038-Enable-Improved-ping-sending.patch index ef5aaab3cd..e66c46ca6c 100644 --- a/CraftBukkit-Patches/0037-Enable-Improved-ping-sending.patch +++ b/CraftBukkit-Patches/0038-Enable-Improved-ping-sending.patch @@ -1,4 +1,4 @@ -From e55549d3056a5b72e47f0b54438c057ca4cd3182 Mon Sep 17 00:00:00 2001 +From bd5f552eae7391d9c4798d270821d29e337c8e4d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Feb 2013 20:45:20 +1100 Subject: [PATCH] Enable Improved ping sending @@ -48,13 +48,13 @@ index eaeb0bf..f94cc54 100644 public void sendAll(Packet packet) { for (int i = 0; i < this.players.size(); ++i) { diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 80b4feb..891d7fa 100644 +index 6d8cf5f..9b59af9 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -33,6 +33,7 @@ settings: - command-complete: true spam-exclusions: - /skill + filter-unsafe-ips: false + tab-ping: false timeout-time: 30 restart-on-crash: false diff --git a/CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch b/CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch deleted file mode 100644 index 022fb19ea9..0000000000 --- a/CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 7c45fcce863877c76d52a4878aa9ccacc37b24b9 Mon Sep 17 00:00:00 2001 -From: Benjamin James Harrison-Sims -Date: Sun, 14 Apr 2013 21:19:57 +0500 -Subject: [PATCH] Prevent handshake spam from invalid names. - - -diff --git a/src/main/java/net/minecraft/server/Packet2Handshake.java b/src/main/java/net/minecraft/server/Packet2Handshake.java -index 343af93..aa6609b 100644 ---- a/src/main/java/net/minecraft/server/Packet2Handshake.java -+++ b/src/main/java/net/minecraft/server/Packet2Handshake.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; - -+import org.bukkit.craftbukkit.Spigot; -+ - import java.io.DataInputStream; - import java.io.DataOutputStream; - -@@ -19,6 +21,7 @@ public class Packet2Handshake extends Packet { - this.b = a(datainputstream, 16); - this.c = a(datainputstream, 255); - this.d = datainputstream.readInt(); -+ if(!Spigot.validName.matcher(this.b).matches()) throw new IOException("Invalid name!"); // Spigot - } - - public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException -diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index 504bd8b..2bb9664 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -9,6 +9,8 @@ import org.bukkit.configuration.file.YamlConfiguration; - - import java.util.List; - import java.util.logging.Level; -+import java.util.regex.Pattern; -+ - import net.minecraft.server.EntityPlayer; - import org.bukkit.Bukkit; - import org.spigotmc.Metrics; -@@ -25,6 +27,7 @@ public class Spigot { - private static Metrics metrics; - public static List bungeeIPs; - public static int textureResolution = 16; -+ public static final Pattern validName = Pattern.compile("^[a-zA-Z0-9_-]{2,16}$"); - - public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { - commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); --- -1.8.2.1 - diff --git a/CraftBukkit-Patches/0039-Prevent-handshake-spam-from-invalid-names.patch b/CraftBukkit-Patches/0039-Prevent-handshake-spam-from-invalid-names.patch new file mode 100644 index 0000000000..40cc6635c2 --- /dev/null +++ b/CraftBukkit-Patches/0039-Prevent-handshake-spam-from-invalid-names.patch @@ -0,0 +1,86 @@ +From c3e72db478ea4e2b69bee03318be189cb7bc257b Mon Sep 17 00:00:00 2001 +From: Benjamin James Harrison-Sims +Date: Sun, 14 Apr 2013 21:19:57 +0500 +Subject: [PATCH] Prevent handshake spam from invalid names. + + +diff --git a/src/main/java/net/minecraft/server/Packet2Handshake.java b/src/main/java/net/minecraft/server/Packet2Handshake.java +index 343af93..aa6609b 100644 +--- a/src/main/java/net/minecraft/server/Packet2Handshake.java ++++ b/src/main/java/net/minecraft/server/Packet2Handshake.java +@@ -1,5 +1,7 @@ + package net.minecraft.server; + ++import org.bukkit.craftbukkit.Spigot; ++ + import java.io.DataInputStream; + import java.io.DataOutputStream; + +@@ -19,6 +21,7 @@ public class Packet2Handshake extends Packet { + this.b = a(datainputstream, 16); + this.c = a(datainputstream, 255); + this.d = datainputstream.readInt(); ++ if(!Spigot.validName.matcher(this.b).matches()) throw new IOException("Invalid name!"); // Spigot + } + + public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException +diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java +index 490553b..1f61d23 100644 +--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java ++++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java +@@ -6,6 +6,7 @@ import java.net.InetAddress; + import java.util.ArrayList; + import java.util.List; + import java.util.logging.Level; ++import java.util.regex.Pattern; + import net.minecraft.server.AxisAlignedBB; + import net.minecraft.server.Chunk; + import net.minecraft.server.Entity; +@@ -16,12 +17,17 @@ import net.minecraft.server.EntityComplexPart; + import net.minecraft.server.EntityCreature; + import net.minecraft.server.EntityEnderCrystal; + import net.minecraft.server.EntityEnderDragon; ++import net.minecraft.server.EntityExperienceOrb; + import net.minecraft.server.EntityFireball; + import net.minecraft.server.EntityFireworks; ++import net.minecraft.server.EntityGhast; + import net.minecraft.server.EntityHuman; ++import net.minecraft.server.EntityItem; + import net.minecraft.server.EntityItemFrame; + import net.minecraft.server.EntityLiving; + import net.minecraft.server.EntityMonster; ++import net.minecraft.server.EntityPainting; ++import net.minecraft.server.EntityPlayer; + import net.minecraft.server.EntityProjectile; + import net.minecraft.server.EntitySheep; + import net.minecraft.server.EntitySlime; +@@ -30,6 +36,7 @@ import net.minecraft.server.EntityWeather; + import net.minecraft.server.EntityWither; + import net.minecraft.server.MathHelper; + import net.minecraft.server.MinecraftServer; ++import net.minecraft.server.Packet255KickDisconnect; + import net.minecraft.server.PendingConnection; + import net.minecraft.server.World; + import org.bukkit.Bukkit; +@@ -50,6 +57,7 @@ public class Spigot { + private static Metrics metrics; + public static List bungeeIPs; + public static int textureResolution = 16; ++ public static final Pattern validName = Pattern.compile("^[a-zA-Z0-9_-]{2,16}$"); + + public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { + commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); +@@ -376,7 +384,9 @@ public class Spigot { + } + + /** +- * Gets the range an entity should be 'tracked' by players and visible in the client. ++ * Gets the range an entity should be 'tracked' by players and visible in ++ * the client. ++ * + * @param entity + * @param defaultRange Default range defined by Mojang + * @return +-- +1.8.2.1 + diff --git a/CraftBukkit-Patches/0039-Snapshot-Protocol.patch b/CraftBukkit-Patches/0040-Snapshot-Protocol.patch similarity index 95% rename from CraftBukkit-Patches/0039-Snapshot-Protocol.patch rename to CraftBukkit-Patches/0040-Snapshot-Protocol.patch index 1c7318d552..fb03370b49 100644 --- a/CraftBukkit-Patches/0039-Snapshot-Protocol.patch +++ b/CraftBukkit-Patches/0040-Snapshot-Protocol.patch @@ -1,4 +1,4 @@ -From 4499dfd50e9bf1272980f4ca537b4c507e55fe28 Mon Sep 17 00:00:00 2001 +From d504f3069c822a67043c68e27a56a1bdff559266 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 Apr 2013 19:13:42 +1000 Subject: [PATCH] Snapshot Protocol @@ -340,10 +340,10 @@ index 72fb172..9e5035a 100644 for (Object object : list) { if (s == null) { diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index 2bb9664..8a513a6 100644 +index 1f61d23..fcdad66 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -28,6 +28,9 @@ public class Spigot { +@@ -58,6 +58,9 @@ public class Spigot { public static List bungeeIPs; public static int textureResolution = 16; public static final Pattern validName = Pattern.compile("^[a-zA-Z0-9_-]{2,16}$"); @@ -353,7 +353,7 @@ index 2bb9664..8a513a6 100644 public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); -@@ -67,6 +70,10 @@ public class Spigot { +@@ -97,6 +100,10 @@ public class Spigot { tabPing = configuration.getBoolean("settings.tab-ping", tabPing); bungeeIPs = configuration.getStringList("settings.bungee-proxies"); textureResolution = configuration.getInt("settings.texture-resolution", textureResolution); @@ -364,19 +364,8 @@ index 2bb9664..8a513a6 100644 if (metrics == null) { try { -@@ -354,7 +361,9 @@ public class Spigot { - } - - /** -- * Gets the range an entity should be 'tracked' by players and visible in the client. -+ * Gets the range an entity should be 'tracked' by players and visible in -+ * the client. -+ * - * @param entity - * @param defaultRange Default range defined by Mojang - * @return diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 891d7fa..1534a25 100644 +index 9b59af9..d4546ef 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -40,6 +40,8 @@ settings: diff --git a/CraftBukkit-Patches/0040-Save-entity-counts-for-randomly-spawned-creatures-to.patch b/CraftBukkit-Patches/0041-Save-entity-counts-for-randomly-spawned-creatures-to.patch similarity index 91% rename from CraftBukkit-Patches/0040-Save-entity-counts-for-randomly-spawned-creatures-to.patch rename to CraftBukkit-Patches/0041-Save-entity-counts-for-randomly-spawned-creatures-to.patch index 8b1ff0e76f..6617ee2412 100644 --- a/CraftBukkit-Patches/0040-Save-entity-counts-for-randomly-spawned-creatures-to.patch +++ b/CraftBukkit-Patches/0041-Save-entity-counts-for-randomly-spawned-creatures-to.patch @@ -1,13 +1,9 @@ -From 42fcf69ddb25ec9aebbd6bbd45e552870b0373a9 Mon Sep 17 00:00:00 2001 +From 093324f22d92096d4d3e22509a6fef21f47343c8 Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Sat, 20 Apr 2013 12:26:20 +0500 Subject: [PATCH] Save entity counts for randomly spawned creatures to avoid repeatedly traversing over the entity slices ---- - src/main/java/net/minecraft/server/Chunk.java | 16 ++++++++++++++++ - src/main/java/net/minecraft/server/SpawnerCreature.java | 10 ++-------- - 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index 7f1c155..11e1a4e 100644 @@ -79,5 +75,5 @@ index 6362a37..2c3b94d 100644 } return i; -- -1.7.11.msysgit.0 +1.8.2.1