From 07b12237b575b2a48f7741a5eba665f2c9802ceb Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 17:31:40 +1000 Subject: [PATCH 01/40] Implement yaml load / save methods. --- .../0004-Spigot-Configuration.patch | 248 ++++++++++++------ 1 file changed, 170 insertions(+), 78 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index ff0d860..a037a6e 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,100 +1,192 @@ -From 21486d9d244f3c22b6e8643c9495592493bcc1f9 Mon Sep 17 00:00:00 2001 +From fba3fb120161a1618a8991784bd0822087af733d Mon Sep 17 00:00:00 2001 From: md_5 -Date: Tue, 14 May 2013 12:06:27 +1000 +Date: Thu, 20 Jun 2013 17:28:01 +1000 Subject: [PATCH] Spigot Configuration diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 7261dc9..10ce69d 100644 +index 7261dc9..6668b7e 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -55,6 +55,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -47,6 +47,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + System.setOut(new PrintStream(new LoggerOutputStream(this.getLogger().getLogger(), Level.INFO), true)); + System.setErr(new PrintStream(new LoggerOutputStream(this.getLogger().getLogger(), Level.SEVERE), true)); + // CraftBukkit end ++ org.spigotmc.SpigotConfig.init(); // Spigot - this.getLogger().info("Loading properties"); - this.propertyManager = new PropertyManager(this.options, this.getLogger()); // CraftBukkit - CLI argument support -+ this.a((PlayerList) (new DedicatedPlayerList(this))); // Spigot - moved up from below - if (this.I()) { - this.d("127.0.0.1"); - } else { -@@ -103,7 +104,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - return false; - } - -- this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit -+ // this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit // Spigot - moved to top of method - - if (!this.getOnlineMode()) { - this.getLogger().warning("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!"); + this.getLogger().info("Starting minecraft server version 1.5.2"); + if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3a4ddea..e67f520 100644 +index 3a4ddea..de052bd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -111,7 +111,7 @@ public abstract class World implements IBlockAccess { +@@ -99,6 +99,7 @@ public abstract class World implements IBlockAccess { + int lastXAccessed = Integer.MIN_VALUE; + int lastZAccessed = Integer.MIN_VALUE; + final Object chunkLock = new Object(); ++ public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot + + public CraftWorld getWorld() { + return this.world; +@@ -110,6 +111,7 @@ public abstract class World implements IBlockAccess { + // Changed signature public World(IDataManager idatamanager, String s, WorldSettings worldsettings, WorldProvider worldprovider, MethodProfiler methodprofiler, IConsoleLogManager iconsolelogmanager, ChunkGenerator gen, org.bukkit.World.Environment env) { ++ this.spigotConfig = new org.spigotmc.SpigotWorldConfig( s ); // Spigot this.generator = gen; -- this.world = new CraftWorld((WorldServer) this, gen, env); -+ this.world = new CraftWorld((WorldServer) this, gen, env, s); // Spigot + this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit - this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit - // CraftBukkit end -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6cb50b7..2956e75 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 { - protected final MinecraftServer console; - protected final DedicatedPlayerList playerList; - private final Map worlds = new LinkedHashMap(); -- private YamlConfiguration configuration; -+ public YamlConfiguration configuration; // Spigot - private final Yaml yaml = new Yaml(new SafeConstructor()); - private final Map offlinePlayers = new MapMaker().softValues().makeMap(); - private final AutoUpdater updater; -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c0fb528..e6fdbe5 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -67,8 +67,14 @@ public class CraftWorld implements World { - private int chunkGCTickCount; - - private static final Random rand = new Random(); -- -+ -+ // Spigot start - public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) { -+ this( world, gen, env, "default" ); +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +new file mode 100644 +index 0000000..7bb7712 +--- /dev/null ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -0,0 +1,91 @@ ++package org.spigotmc; ++ ++import com.google.common.base.Throwables; ++import java.io.File; ++import java.io.IOException; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Modifier; ++import java.util.logging.Level; ++import org.bukkit.Bukkit; ++import org.bukkit.configuration.file.YamlConfiguration; ++ ++public class SpigotConfig ++{ ++ ++ private static final File CONFIG_FILE = new File( "spigot.yml" ); ++ private static final String HEADER = "This is the main configuration file for Spigot.\n" ++ + "As you can see, there's tons to configure. Some options may impact gameplay, so use\n" ++ + "with caution, and make sure you know what each option does before configuring.\n" ++ + "For a reference for any variable inside this file, check out the Spigot wiki at\n" ++ + "http://www.spigotmc.org/wiki/spigot-configuration/\n" ++ + "\n" ++ + "If you need help with the configuration or have any questions related to Spigot,\n" ++ + "join us at the IRC or drop by our forums and leave a post.\n" ++ + "\n" ++ + "IRC: #spigot @ irc.esper.net ( http://webchat.esper.net/?channel=spigot )\n" ++ + "Forums: http://www.spigotmc.org/forum/"; ++ /*========================================================================*/ ++ static YamlConfiguration config; ++ static int version; ++ /*========================================================================*/ ++ ++ public static void init() ++ { ++ config = YamlConfiguration.loadConfiguration( CONFIG_FILE ); ++ config.options().header( HEADER ); ++ config.options().copyDefaults( true ); ++ ++ version = getInt( config, "config-version", 1 ); ++ readConfig( SpigotConfig.class ); + } + -+ public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env, String name) { -+ // Spigot end - this.world = world; - this.generator = gen; - -@@ -77,6 +83,23 @@ public class CraftWorld implements World { - if (server.chunkGCPeriod > 0) { - chunkGCTickCount = rand.nextInt(server.chunkGCPeriod); - } -+ // Spigot start -+ org.bukkit.configuration.file.YamlConfiguration configuration = server.configuration; -+ name = name.replaceAll( " ", "_" ); -+ -+ // Load defaults first -+ boolean info = configuration.getBoolean( "world-settings.default.info", true ); -+ -+ // Override defaults with world specific, if they exist -+ info = configuration.getBoolean( "world-settings." + name + ".info", info ); -+ -+ if ( info ) ++ static void readConfig(Class clazz) ++ { ++ for ( Method method : SpigotConfig.class.getDeclaredMethods() ) + { -+ server.getLogger().info( "-------------- Spigot ----------------" ); -+ server.getLogger().info( "-------- World Settings For [" + name + "] --------" ); -+ server.getLogger().info( "-------------------------------------------------" ); ++ if ( Modifier.isPrivate( method.getModifiers() ) && Modifier.isStatic( method.getModifiers() ) ) ++ { ++ if ( method.getParameterTypes().length == 1 && method.getParameterTypes()[0] == YamlConfiguration.class ) ++ { ++ try ++ { ++ method.invoke( null, config ); ++ } catch ( InvocationTargetException ex ) ++ { ++ Throwables.propagate( ex.getCause() ); ++ } catch ( ReflectiveOperationException ex ) ++ { ++ Bukkit.getLogger().log( Level.SEVERE, "Error invoking " + method, ex ); ++ } ++ } ++ } + } -+ // Spigot end - } - - public Block getBlockAt(int x, int y, int z) { ++ ++ try ++ { ++ config.save( CONFIG_FILE ); ++ } catch ( IOException ex ) ++ { ++ Bukkit.getLogger().log( Level.SEVERE, "Could not save " + CONFIG_FILE, ex ); ++ } ++ } ++ ++ private static boolean getBoolean(YamlConfiguration config, String path, boolean def) ++ { ++ config.addDefault( path, def ); ++ return config.getBoolean( path, config.getBoolean( path ) ); ++ } ++ ++ private static int getInt(YamlConfiguration config, String path, int def) ++ { ++ config.addDefault( path, def ); ++ return config.getInt( path, config.getInt( path ) ); ++ } ++ ++ private static String getString(YamlConfiguration config, String path, String def) ++ { ++ config.addDefault( path, def ); ++ return config.getString( path, config.getString( path ) ); ++ } ++} +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +new file mode 100644 +index 0000000..9818836 +--- /dev/null ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -0,0 +1,48 @@ ++package org.spigotmc; ++ ++import org.bukkit.Bukkit; ++import org.bukkit.configuration.file.YamlConfiguration; ++ ++public class SpigotWorldConfig ++{ ++ ++ private final String worldName; ++ private final boolean verbose; ++ ++ public SpigotWorldConfig(String worldName) ++ { ++ this.worldName = worldName; ++ this.verbose = getBoolean( SpigotConfig.config, "verbose", true ); ++ ++ log( "-------------- Spigot ----------------" ); ++ log( "-------- World Settings For [" + worldName + "] --------" ); ++ log( "-------------------------------------------------" ); ++ SpigotConfig.readConfig( SpigotWorldConfig.class ); ++ } ++ ++ private void log(String s) ++ { ++ if ( verbose ) ++ { ++ Bukkit.getLogger().info( s ); ++ } ++ } ++ ++ private boolean getBoolean(YamlConfiguration config, String path, boolean def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return config.getBoolean( "world-settings." + worldName + "." + path, config.getBoolean( "world-settings.default." + path ) ); ++ } ++ ++ private int getInt(YamlConfiguration config, String path, int def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return config.getInt( "world-settings." + worldName + "." + path, config.getInt( "world-settings.default." + path ) ); ++ } ++ ++ private String getString(YamlConfiguration config, String path, String def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); ++ } ++} -- 1.8.1.2 From 919070df83f010f5cb27b9f98643e34e285a8f5e Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 17:36:06 +1000 Subject: [PATCH 02/40] Simplify --- .../0004-Spigot-Configuration.patch | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index a037a6e..7e579b4 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,6 +1,6 @@ -From fba3fb120161a1618a8991784bd0822087af733d Mon Sep 17 00:00:00 2001 +From f6b9d470ca4aa3abddd5eaa0c3d50ca1db0802b5 Mon Sep 17 00:00:00 2001 From: md_5 -Date: Thu, 20 Jun 2013 17:28:01 +1000 +Date: Thu, 20 Jun 2013 17:35:57 +1000 Subject: [PATCH] Spigot Configuration @@ -38,7 +38,7 @@ index 3a4ddea..de052bd 100644 this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..7bb7712 +index 0000000..80a76c1 --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +1,91 @@ @@ -80,7 +80,7 @@ index 0000000..7bb7712 + config.options().header( HEADER ); + config.options().copyDefaults( true ); + -+ version = getInt( config, "config-version", 1 ); ++ version = getInt( "config-version", 1 ); + readConfig( SpigotConfig.class ); + } + @@ -90,11 +90,11 @@ index 0000000..7bb7712 + { + if ( Modifier.isPrivate( method.getModifiers() ) && Modifier.isStatic( method.getModifiers() ) ) + { -+ if ( method.getParameterTypes().length == 1 && method.getParameterTypes()[0] == YamlConfiguration.class ) ++ if ( method.getParameterTypes().length == 0 ) + { + try + { -+ method.invoke( null, config ); ++ method.invoke( null ); + } catch ( InvocationTargetException ex ) + { + Throwables.propagate( ex.getCause() ); @@ -115,19 +115,19 @@ index 0000000..7bb7712 + } + } + -+ private static boolean getBoolean(YamlConfiguration config, String path, boolean def) ++ private static boolean getBoolean(String path, boolean def) + { + config.addDefault( path, def ); + return config.getBoolean( path, config.getBoolean( path ) ); + } + -+ private static int getInt(YamlConfiguration config, String path, int def) ++ private static int getInt(String path, int def) + { + config.addDefault( path, def ); + return config.getInt( path, config.getInt( path ) ); + } + -+ private static String getString(YamlConfiguration config, String path, String def) ++ private static String getString(String path, String def) + { + config.addDefault( path, def ); + return config.getString( path, config.getString( path ) ); @@ -135,10 +135,10 @@ index 0000000..7bb7712 +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java new file mode 100644 -index 0000000..9818836 +index 0000000..b954278 --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -0,0 +1,48 @@ +@@ -0,0 +1,50 @@ +package org.spigotmc; + +import org.bukkit.Bukkit; @@ -148,12 +148,14 @@ index 0000000..9818836 +{ + + private final String worldName; ++ private final YamlConfiguration config; + private final boolean verbose; + + public SpigotWorldConfig(String worldName) + { + this.worldName = worldName; -+ this.verbose = getBoolean( SpigotConfig.config, "verbose", true ); ++ this.config = SpigotConfig.config; ++ this.verbose = getBoolean( "verbose", true ); + + log( "-------------- Spigot ----------------" ); + log( "-------- World Settings For [" + worldName + "] --------" ); @@ -169,19 +171,19 @@ index 0000000..9818836 + } + } + -+ private boolean getBoolean(YamlConfiguration config, String path, boolean def) ++ private boolean getBoolean(String path, boolean def) + { + config.addDefault( "world-settings.default." + path, def ); + return config.getBoolean( "world-settings." + worldName + "." + path, config.getBoolean( "world-settings.default." + path ) ); + } + -+ private int getInt(YamlConfiguration config, String path, int def) ++ private int getInt(String path, int def) + { + config.addDefault( "world-settings.default." + path, def ); + return config.getInt( "world-settings." + worldName + "." + path, config.getInt( "world-settings.default." + path ) ); + } + -+ private String getString(YamlConfiguration config, String path, String def) ++ private String getString(String path, String def) + { + config.addDefault( "world-settings.default." + path, def ); + return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); From ccd447743e527fa3fc41f3bbb15be587ada220c7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 17:52:17 +1000 Subject: [PATCH 03/40] Show off some WIP patches. --- .../0005-Better-Chunk-Tick-Selection.patch | 60 ++++++--------- CraftBukkit-Patches/0006-Spigot-Changes.patch | 73 +------------------ .../0008-More-Efficient-GetCubes.patch | 6 +- 3 files changed, 26 insertions(+), 113 deletions(-) diff --git a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch index a907aaa..eec4765 100644 --- a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch +++ b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch @@ -1,11 +1,11 @@ -From 11e91bebc30bae349454231d0c0e120918de03aa Mon Sep 17 00:00:00 2001 +From fe7535a22ad65e997e3bec6529f4a9ec49e51cfb Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:56:02 +1000 Subject: [PATCH] Better Chunk Tick Selection diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e67f520..96190de 100644 +index de052bd..bc692dd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -66,13 +66,35 @@ public abstract class World implements IBlockAccess { @@ -45,24 +45,24 @@ index e67f520..96190de 100644 public BiomeBase getBiome(int i, int j) { if (this.isLoaded(i, 0, j)) { -@@ -115,6 +137,11 @@ public abstract class World implements IBlockAccess { +@@ -117,6 +139,11 @@ public abstract class World implements IBlockAccess { this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit // CraftBukkit end + // Spigot start + this.chunkTickRadius = (byte) ( ( this.getServer().getViewDistance() < 7 ) ? this.getServer().getViewDistance() : 7 ); -+ this.chunkTickList = new gnu.trove.map.hash.TLongShortHashMap( world.growthPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE ); ++ this.chunkTickList = new gnu.trove.map.hash.TLongShortHashMap( spigotConfig.chunksPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE ); + this.chunkTickList.setAutoCompactionFactor( 0 ); + // Spigot end this.O = this.random.nextInt(12000); this.H = new int['\u8000']; -@@ -1954,24 +1981,44 @@ public abstract class World implements IBlockAccess { +@@ -1956,24 +1983,44 @@ public abstract class World implements IBlockAccess { int j; int k; + // Spigot start -+ int optimalChunks = this.getWorld().growthPerTick; ++ int optimalChunks = spigotConfig.chunksPerTick; + // Quick conditions to allow us to exist early + if ( optimalChunks <= 0 || players.isEmpty() ) + { @@ -147,40 +147,22 @@ index 49360c1..6c3fcf1 100644 block.a(this, k2 + k, i3 + chunksection.getYPosition(), l2 + l, this.random); } } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e6fdbe5..a9b4e71 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -67,7 +67,10 @@ public class CraftWorld implements World { - private int chunkGCTickCount; - - private static final Random rand = new Random(); -- -+ // Spigot start -+ public int growthPerTick = 650; -+ // Spigot end +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index b954278..7d4cf91 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -47,4 +47,11 @@ public class SpigotWorldConfig + config.addDefault( "world-settings.default." + path, def ); + return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); + } + - // Spigot start - public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) { - this( world, gen, env, "default" ); -@@ -89,14 +92,17 @@ public class CraftWorld implements World { - - // Load defaults first - boolean info = configuration.getBoolean( "world-settings.default.info", true ); -+ growthPerTick = configuration.getInt( "world-settings.default.growth-chunks-per-tick", growthPerTick ); - - // Override defaults with world specific, if they exist - info = configuration.getBoolean( "world-settings." + name + ".info", info ); -+ growthPerTick = configuration.getInt( "world-settings." + name + ".growth-chunks-per-tick", growthPerTick ); - - if ( info ) - { - server.getLogger().info( "-------------- Spigot ----------------" ); - server.getLogger().info( "-------- World Settings For [" + name + "] --------" ); -+ server.getLogger().info( "Growth Per Tick: " + growthPerTick ); - server.getLogger().info( "-------------------------------------------------" ); - } - // Spigot end ++ public int chunksPerTick = 750; ++ private void chunksPerTick() ++ { ++ chunksPerTick = getInt( "chunks-per-tick", chunksPerTick ); ++ log( "Chunks to Grow per Tick: " + chunksPerTick ); ++ } + } -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0006-Spigot-Changes.patch b/CraftBukkit-Patches/0006-Spigot-Changes.patch index a77e149..38f3d7c 100644 --- a/CraftBukkit-Patches/0006-Spigot-Changes.patch +++ b/CraftBukkit-Patches/0006-Spigot-Changes.patch @@ -1,4 +1,4 @@ -From 6e1048caeaaa323e667d8bf92aa28f5ffed810e3 Mon Sep 17 00:00:00 2001 +From 41fa2773f2174d13e06dc8696b97c5c95e9fa69c Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 13:55:57 +1000 Subject: [PATCH] Spigot Changes @@ -234,7 +234,7 @@ index 6c3fcf1..4a8d3f4 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2956e75..c234cac 100644 +index 6cb50b7..c78bc0f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -166,6 +166,13 @@ public final class CraftServer implements Server { @@ -298,75 +298,6 @@ index 2956e75..c234cac 100644 } catch (CommandException ex) { player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a9b4e71..9789ba4 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -69,6 +69,17 @@ public class CraftWorld implements World { - private static final Random rand = new Random(); - // Spigot start - public int growthPerTick = 650; -+ public boolean randomLightingUpdates = false; -+ public int mobSpawnRange = 4; -+ public int aggregateTicks = 4; -+ // Crop growth rates: -+ public int wheatGrowthModifier = 100; -+ public int cactusGrowthModifier = 100; -+ public int melonGrowthModifier = 100; -+ public int pumpkinGrowthModifier = 100; -+ public int sugarGrowthModifier = 100; -+ public int treeGrowthModifier = 100; -+ public int mushroomGrowthModifier = 100; - // Spigot end - - // Spigot start -@@ -93,16 +104,46 @@ public class CraftWorld implements World { - // Load defaults first - boolean info = configuration.getBoolean( "world-settings.default.info", true ); - growthPerTick = configuration.getInt( "world-settings.default.growth-chunks-per-tick", growthPerTick ); -+ randomLightingUpdates = configuration.getBoolean( "world-settings.default.random-light-updates", randomLightingUpdates ); -+ mobSpawnRange = configuration.getInt( "world-settings.default.mob-spawn-range", mobSpawnRange ); -+ aggregateTicks = Math.max( 1, configuration.getInt( "world-settings.default.aggregate-chunkticks", aggregateTicks ) ); -+ wheatGrowthModifier = configuration.getInt( "world-settings.default.wheat-growth-modifier", wheatGrowthModifier ); -+ cactusGrowthModifier = configuration.getInt( "world-settings.default.cactus-growth-modifier", cactusGrowthModifier ); -+ melonGrowthModifier = configuration.getInt( "world-settings.default.melon-growth-modifier", melonGrowthModifier ); -+ pumpkinGrowthModifier = configuration.getInt( "world-settings.default.pumpkin-growth-modifier", pumpkinGrowthModifier ); -+ sugarGrowthModifier = configuration.getInt( "world-settings.default.sugar-growth-modifier", sugarGrowthModifier ); -+ treeGrowthModifier = configuration.getInt( "world-settings.default.tree-growth-modifier", treeGrowthModifier ); -+ mushroomGrowthModifier = configuration.getInt( "world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier ); - - // Override defaults with world specific, if they exist - info = configuration.getBoolean( "world-settings." + name + ".info", info ); - growthPerTick = configuration.getInt( "world-settings." + name + ".growth-chunks-per-tick", growthPerTick ); -+ randomLightingUpdates = configuration.getBoolean( "world-settings." + name + ".random-light-updates", randomLightingUpdates ); -+ mobSpawnRange = configuration.getInt( "world-settings." + name + ".mob-spawn-range", mobSpawnRange ); -+ aggregateTicks = Math.max( 1, configuration.getInt( "world-settings." + name + ".aggregate-chunkticks", aggregateTicks ) ); -+ wheatGrowthModifier = configuration.getInt( "world-settings." + name + ".wheat-growth-modifier", wheatGrowthModifier ); -+ cactusGrowthModifier = configuration.getInt( "world-settings." + name + ".cactus-growth-modifier", cactusGrowthModifier ); -+ melonGrowthModifier = configuration.getInt( "world-settings." + name + ".melon-growth-modifier", melonGrowthModifier ); -+ pumpkinGrowthModifier = configuration.getInt( "world-settings." + name + ".pumpkin-growth-modifier", pumpkinGrowthModifier ); -+ sugarGrowthModifier = configuration.getInt( "world-settings." + name + ".sugar-growth-modifier", sugarGrowthModifier ); -+ treeGrowthModifier = configuration.getInt( "world-settings." + name + ".tree-growth-modifier", treeGrowthModifier ); -+ mushroomGrowthModifier = configuration.getInt( "world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier ); - - if ( info ) - { - server.getLogger().info( "-------------- Spigot ----------------" ); - server.getLogger().info( "-------- World Settings For [" + name + "] --------" ); - server.getLogger().info( "Growth Per Tick: " + growthPerTick ); -+ server.getLogger().info( "Random Lighting Updates: " + randomLightingUpdates ); -+ server.getLogger().info( "Mob Spawn Range: " + mobSpawnRange ); -+ server.getLogger().info( "Aggregate Ticks: " + aggregateTicks ); -+ server.getLogger().info( "Wheat Growth Modifier: " + wheatGrowthModifier ); -+ server.getLogger().info( "Cactus Growth Modifier: " + cactusGrowthModifier ); -+ server.getLogger().info( "Melon Growth Modifier: " + melonGrowthModifier ); -+ server.getLogger().info( "Pumpkin Growth Modifier: " + pumpkinGrowthModifier ); -+ server.getLogger().info( "Sugar Growth Modifier: " + sugarGrowthModifier ); -+ server.getLogger().info( "Tree Growth Modifier: " + treeGrowthModifier ); -+ server.getLogger().info( "Mushroom Growth Modifier: " + mushroomGrowthModifier ); - server.getLogger().info( "-------------------------------------------------" ); - } - // Spigot end 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..2cd806e diff --git a/CraftBukkit-Patches/0008-More-Efficient-GetCubes.patch b/CraftBukkit-Patches/0008-More-Efficient-GetCubes.patch index 2c0e1a1..b5a197c 100644 --- a/CraftBukkit-Patches/0008-More-Efficient-GetCubes.patch +++ b/CraftBukkit-Patches/0008-More-Efficient-GetCubes.patch @@ -1,14 +1,14 @@ -From 40e0140e1cf0aa8874a75e36bcf4aa32ac69a25f Mon Sep 17 00:00:00 2001 +From fbb1eeb9f5d6d721eed18bbe1ffae9cc31dd8ae5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:17:37 +1000 Subject: [PATCH] More Efficient GetCubes diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 96190de..dcad74f 100644 +index bc692dd..afe3e4d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1043,19 +1043,47 @@ public abstract class World implements IBlockAccess { +@@ -1045,19 +1045,47 @@ public abstract class World implements IBlockAccess { int i1 = MathHelper.floor(axisalignedbb.c); int j1 = MathHelper.floor(axisalignedbb.f + 1.0D); From ba7c6ef6b0c0f01ffaf345efc81a29143297c8be Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 18:16:28 +1000 Subject: [PATCH 04/40] Add more to the config --- .../0004-Spigot-Configuration.patch | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 7e579b4..098eb30 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,4 +1,4 @@ -From f6b9d470ca4aa3abddd5eaa0c3d50ca1db0802b5 Mon Sep 17 00:00:00 2001 +From f1b9716fd4c673cd0074121a4084fcf1cdc3137b Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 17:35:57 +1000 Subject: [PATCH] Spigot Configuration @@ -38,10 +38,10 @@ index 3a4ddea..de052bd 100644 this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..80a76c1 +index 0000000..bf297bc --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -0,0 +1,91 @@ +@@ -0,0 +1,98 @@ +package org.spigotmc; + +import com.google.common.base.Throwables; @@ -50,6 +50,7 @@ index 0000000..80a76c1 +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; ++import java.util.List; +import java.util.logging.Level; +import org.bukkit.Bukkit; +import org.bukkit.configuration.file.YamlConfiguration; @@ -81,20 +82,20 @@ index 0000000..80a76c1 + config.options().copyDefaults( true ); + + version = getInt( "config-version", 1 ); -+ readConfig( SpigotConfig.class ); ++ readConfig( SpigotConfig.class, null ); + } + -+ static void readConfig(Class clazz) ++ static void readConfig(Class clazz, Object instance) + { + for ( Method method : SpigotConfig.class.getDeclaredMethods() ) + { -+ if ( Modifier.isPrivate( method.getModifiers() ) && Modifier.isStatic( method.getModifiers() ) ) ++ if ( Modifier.isPrivate( method.getModifiers() ) ) + { + if ( method.getParameterTypes().length == 0 ) + { + try + { -+ method.invoke( null ); ++ method.invoke( instance ); + } catch ( InvocationTargetException ex ) + { + Throwables.propagate( ex.getCause() ); @@ -127,6 +128,12 @@ index 0000000..80a76c1 + return config.getInt( path, config.getInt( path ) ); + } + ++ private List getList(String path, T def) ++ { ++ config.addDefault( path, def ); ++ return (List) config.getList( path, config.getList( path ) ); ++ } ++ + private static String getString(String path, String def) + { + config.addDefault( path, def ); @@ -135,12 +142,13 @@ index 0000000..80a76c1 +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java new file mode 100644 -index 0000000..b954278 +index 0000000..7d3ec55 --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -0,0 +1,50 @@ +@@ -0,0 +1,57 @@ +package org.spigotmc; + ++import java.util.List; +import org.bukkit.Bukkit; +import org.bukkit.configuration.file.YamlConfiguration; + @@ -160,7 +168,7 @@ index 0000000..b954278 + log( "-------------- Spigot ----------------" ); + log( "-------- World Settings For [" + worldName + "] --------" ); + log( "-------------------------------------------------" ); -+ SpigotConfig.readConfig( SpigotWorldConfig.class ); ++ SpigotConfig.readConfig( SpigotWorldConfig.class, this ); + } + + private void log(String s) @@ -183,6 +191,12 @@ index 0000000..b954278 + return config.getInt( "world-settings." + worldName + "." + path, config.getInt( "world-settings.default." + path ) ); + } + ++ private List getList(String path, T def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return (List) config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) ); ++ } ++ + private String getString(String path, String def) + { + config.addDefault( "world-settings.default." + path, def ); From df45aed819e7ec459bbb87cc96d05e66fd379223 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 18:21:31 +1000 Subject: [PATCH 05/40] Rough Spigot Changes --- .../0005-Better-Chunk-Tick-Selection.patch | 6 +- CraftBukkit-Patches/0006-Spigot-Changes.patch | 294 ++++++++---------- 2 files changed, 125 insertions(+), 175 deletions(-) diff --git a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch index eec4765..b254073 100644 --- a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch +++ b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch @@ -1,4 +1,4 @@ -From fe7535a22ad65e997e3bec6529f4a9ec49e51cfb Mon Sep 17 00:00:00 2001 +From 1abb83644de1706b96b50f0497854ecc1f228a12 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:56:02 +1000 Subject: [PATCH] Better Chunk Tick Selection @@ -148,10 +148,10 @@ index 49360c1..6c3fcf1 100644 } } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index b954278..7d4cf91 100644 +index 7d3ec55..4e1bdcf 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -47,4 +47,11 @@ public class SpigotWorldConfig +@@ -54,4 +54,11 @@ public class SpigotWorldConfig config.addDefault( "world-settings.default." + path, def ); return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); } diff --git a/CraftBukkit-Patches/0006-Spigot-Changes.patch b/CraftBukkit-Patches/0006-Spigot-Changes.patch index 38f3d7c..c8e3897 100644 --- a/CraftBukkit-Patches/0006-Spigot-Changes.patch +++ b/CraftBukkit-Patches/0006-Spigot-Changes.patch @@ -1,20 +1,9 @@ -From 41fa2773f2174d13e06dc8696b97c5c95e9fa69c Mon Sep 17 00:00:00 2001 +From c2d9713c3da77a4e39cbbea17070b2d41699a913 Mon Sep 17 00:00:00 2001 From: md_5 -Date: Tue, 11 Jun 2013 13:55:57 +1000 +Date: Thu, 20 Jun 2013 18:21:09 +1000 Subject: [PATCH] Spigot Changes -diff --git a/.gitignore b/.gitignore -index c3faf57..346b232 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -34,3 +34,5 @@ - - /src/main/resources/achievement - /src/main/resources/lang -+ -+/dependency-reduced-pom.xml -\ No newline at end of file diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java index 4392cb2..8e041c2 100644 --- a/src/main/java/net/minecraft/server/Block.java @@ -37,7 +26,7 @@ index 4392cb2..8e041c2 100644 + // Spigot end } diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java -index 83cc09d..eed8ded 100644 +index 83cc09d..4376051 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java @@ -23,7 +23,7 @@ public class BlockCactus extends Block { @@ -45,12 +34,12 @@ index 83cc09d..eed8ded 100644 int i1 = world.getData(i, j, k); - if (i1 == 15) { -+ if (i1 >= (byte) range(3, (world.growthOdds / world.getWorld().cactusGrowthModifier * 15) + 0.5F, 15)) { // Spigot ++ if (i1 >= (byte) range(3, (world.growthOdds / world.spigotConfig.cactusModifier * 15) + 0.5F, 15)) { // Spigot org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, i, j + 1, k, this.id, 0); // CraftBukkit world.setData(i, j, k, 0, 4); this.doPhysics(world, i, j + 1, k, this.id); diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java -index 14a1c3b..0aee7af 100644 +index 14a1c3b..d3b6095 100644 --- a/src/main/java/net/minecraft/server/BlockCrops.java +++ b/src/main/java/net/minecraft/server/BlockCrops.java @@ -28,7 +28,7 @@ public class BlockCrops extends BlockFlower { @@ -58,7 +47,7 @@ index 14a1c3b..0aee7af 100644 float f = this.k(world, i, j, k); - if (random.nextInt((int) (25.0F / f) + 1) == 0) { -+ if (random.nextInt((int) (world.growthOdds / world.getWorld().wheatGrowthModifier * (25.0F / f)) + 1) == 0) { // Spigot ++ if (random.nextInt((int) (world.growthOdds / world.spigotConfig.wheatModifier * (25.0F / f)) + 1) == 0) { // Spigot org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, i, j, k, this.id, ++l); // CraftBukkit } } @@ -77,7 +66,7 @@ index 6f9301d..2ccc0b8 100644 int j1 = j + random.nextInt(5) - 3; int k1 = k + random.nextInt(3) - 1; diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java -index 872ad00..6e135a4 100644 +index 872ad00..abc31ac 100644 --- a/src/main/java/net/minecraft/server/BlockMushroom.java +++ b/src/main/java/net/minecraft/server/BlockMushroom.java @@ -27,7 +27,7 @@ public class BlockMushroom extends BlockFlower { @@ -85,7 +74,7 @@ index 872ad00..6e135a4 100644 public void a(World world, int i, int j, int k, Random random) { final int sourceX = i, sourceY = j, sourceZ = k; // CraftBukkit - if (random.nextInt(25) == 0) { -+ if (random.nextInt(Math.max(1, (int) world.growthOdds / world.getWorld().mushroomGrowthModifier * 25)) == 0) { // Spigot ++ if (random.nextInt(Math.max(1, (int) world.growthOdds / world.spigotConfig.mushroomModifier * 25)) == 0) { // Spigot byte b0 = 4; int l = 5; @@ -104,7 +93,7 @@ index 1de8c83..fa11d1c 100644 int j1 = j + random.nextInt(5) - 3; int k1 = k + random.nextInt(3) - 1; diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java -index 8657860..50c5200 100644 +index 8657860..cf52501 100644 --- a/src/main/java/net/minecraft/server/BlockReed.java +++ b/src/main/java/net/minecraft/server/BlockReed.java @@ -23,7 +23,7 @@ public class BlockReed extends Block { @@ -112,12 +101,12 @@ index 8657860..50c5200 100644 int i1 = world.getData(i, j, k); - if (i1 == 15) { -+ if (i1 >= (byte) range(3, (world.growthOdds / world.getWorld().sugarGrowthModifier * 15) + 0.5F, 15)) { // Spigot ++ if (i1 >= (byte) range(3, (world.growthOdds / world.spigotConfig.caneModifier * 15) + 0.5F, 15)) { // Spigot org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, i, j + 1, k, this.id, 0); // CraftBukkit world.setData(i, j, k, 0, 4); } else { diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java -index 3b00939..4ab0fb9 100644 +index 3b00939..d48677a 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java +++ b/src/main/java/net/minecraft/server/BlockSapling.java @@ -26,7 +26,7 @@ public class BlockSapling extends BlockFlower { @@ -125,12 +114,12 @@ index 3b00939..4ab0fb9 100644 if (!world.isStatic) { super.a(world, i, j, k, random); - if (world.getLightLevel(i, j + 1, k) >= 9 && random.nextInt(7) == 0) { -+ if (world.getLightLevel(i, j + 1, k) >= 9 && (random.nextInt(Math.max(2, (int) ((world.growthOdds / world.getWorld().aggregateTicks / world.getWorld().treeGrowthModifier * 7) + 0.5F))) == 0)) { // Spigot ++ if (world.getLightLevel(i, j + 1, k) >= 9 && (random.nextInt(Math.max(2, (int) ((world.growthOdds / world.spigotConfig.tickAggregate / world.spigotConfig.saplingModifier * 7) + 0.5F))) == 0)) { // Spigot this.grow(world, i, j, k, random, false, null, null); // CraftBukkit - added bonemeal, player and itemstack } } diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java -index 8339a35..c17ce36 100644 +index 8339a35..c7e2344 100644 --- a/src/main/java/net/minecraft/server/BlockStem.java +++ b/src/main/java/net/minecraft/server/BlockStem.java @@ -27,7 +27,7 @@ public class BlockStem extends BlockFlower { @@ -138,12 +127,12 @@ index 8339a35..c17ce36 100644 float f = this.m(world, i, j, k); - if (random.nextInt((int) (25.0F / f) + 1) == 0) { -+ if (random.nextInt((int) (world.growthOdds / (this.id == Block.PUMPKIN_STEM.id ? world.getWorld().pumpkinGrowthModifier : world.getWorld().melonGrowthModifier) * (25.0F / f)) + 1) == 0) { // Spigot ++ if (random.nextInt((int) (world.growthOdds / (this.id == Block.PUMPKIN_STEM.id ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier) * (25.0F / f)) + 1) == 0) { // Spigot int l = world.getData(i, j, k); if (l < 7) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 018c314..f6885d6 100644 +index 018c314..52fa75a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -845,8 +845,20 @@ public class PlayerConnection extends Connection { @@ -173,7 +162,7 @@ index 018c314..f6885d6 100644 try { - this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // CraftBukkit -+ if (server.logCommands) this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // Spigot ++ if (org.spigotmc.SpigotConfig.logCommands) this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // Spigot if (this.server.dispatchCommand(event.getPlayer(), event.getMessage().substring(1))) { return; } @@ -188,70 +177,11 @@ index 018c314..f6885d6 100644 } } } -diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index b7e327b..0e3a6a1 100644 ---- a/src/main/java/net/minecraft/server/PlayerList.java -+++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -307,7 +307,7 @@ public abstract class PlayerList { - - event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s1); - } else if (!this.isWhitelisted(s)) { -- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "You are not white-listed on this server!"); -+ event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, cserver.whitelistMessage); // Spigot - } else { - String s2 = socketaddress.toString(); - -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 6c3fcf1..4a8d3f4 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -37,6 +37,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate - private static final StructurePieceTreasure[] S = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.STICK.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.WOOD.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.LOG.id, 0, 1, 3, 10), new StructurePieceTreasure(Item.STONE_AXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_AXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.STONE_PICKAXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_PICKAXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.APPLE.id, 0, 2, 3, 5), new StructurePieceTreasure(Item.BREAD.id, 0, 2, 3, 3)}; - private ArrayList T = new ArrayList(); - private IntHashMap entitiesById; -+ private int aggregateTicks = 1; // Spigot - - // CraftBukkit start - public final int dimension; -@@ -295,6 +296,10 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate - } - - protected void g() { -+ // Spigot start -+ if (--this.aggregateTicks != 0) return; -+ aggregateTicks = this.getWorld().aggregateTicks; -+ // Spigot end - super.g(); - int i = 0; - int j = 0; -@@ -412,7 +417,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate - if (block != null && block.isTicking()) { - ++i; - this.growthOdds = (iter.value() < 1) ? this.modifiedOdds : 100; // Spigot - grow fast if no players are in this chunk (value = player count) -- block.a(this, k2 + k, i3 + chunksection.getYPosition(), l2 + l, this.random); -+ for ( int c = 0; c < ( ( block.id == Block.SAPLING.id ) ? 1 : getWorld().aggregateTicks ); c++ ) block.a(this, k2 + k, i3 + chunksection.getYPosition(), l2 + l, this.random); - } - } - } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6cb50b7..c78bc0f 100644 +index 6cb50b7..2567bde 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -166,6 +166,13 @@ public final class CraftServer implements Server { - private final class BooleanWrapper { - private boolean value = true; - } -+ // Spigot start -+ public String whitelistMessage = "You are not white-listed on this server!"; -+ public String stopMessage = "Server restarting. Brb"; -+ public boolean logCommands = true; -+ public boolean commandComplete = true; -+ public List spamGuardExclusions; -+ // Spigot end - - static { - ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); -@@ -208,12 +215,20 @@ public final class CraftServer implements Server { +@@ -208,7 +208,7 @@ 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")); @@ -260,20 +190,7 @@ index 6cb50b7..c78bc0f 100644 updater.setSuggestChannels(configuration.getBoolean("auto-updater.suggest-channels")); updater.getOnBroken().addAll(configuration.getStringList("auto-updater.on-broken")); updater.getOnUpdate().addAll(configuration.getStringList("auto-updater.on-update")); - updater.check(serverVersion); - -+ // Spigot start -+ Spigot.initialize(this, commandMap, configuration); -+ -+ try { -+ configuration.save(getConfigFile()); -+ } catch (IOException e) { -+ } -+ // Spigot end - loadPlugins(); - enablePlugins(PluginLoadOrder.STARTUP); - } -@@ -535,6 +550,7 @@ public final class CraftServer implements Server { +@@ -535,6 +535,7 @@ public final class CraftServer implements Server { ((DedicatedServer) console).propertyManager = config; @@ -281,48 +198,15 @@ index 6cb50b7..c78bc0f 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 +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" - )); - } -+ Spigot.initialize(this, commandMap, configuration); // Spigot - loadPlugins(); - enablePlugins(PluginLoadOrder.STARTUP); - enablePlugins(PluginLoadOrder.POSTWORLD); -@@ -1326,7 +1343,7 @@ public final class CraftServer implements Server { +@@ -1326,7 +1327,7 @@ public final class CraftServer implements Server { public List tabCompleteCommand(Player player, String message) { List completions = null; try { - completions = getCommandMap().tabComplete(player, message.substring(1)); -+ completions = (commandComplete) ? getCommandMap().tabComplete(player, message.substring(1)) : null; // Spigot ++ completions = (org.spigotmc.SpigotConfig.tabComplete) ? getCommandMap().tabComplete(player, message.substring(1)) : null; // Spigot } catch (CommandException ex) { player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); -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..2cd806e ---- /dev/null -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -0,0 +1,19 @@ -+package org.bukkit.craftbukkit; -+ -+import org.bukkit.command.SimpleCommandMap; -+import org.bukkit.configuration.file.YamlConfiguration; -+ -+public class Spigot { -+ -+ 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"); -+ -+ if (server.chunkGCPeriod == 0) { -+ server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!"); -+ } -+ } -+} diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java index c896ba2..e99cb22 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java @@ -336,41 +220,107 @@ index c896ba2..e99cb22 100644 return; } -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 61a95e3..67c6c5e 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -25,6 +25,30 @@ settings: - query-plugins: true - deprecated-verbose: default - shutdown-message: Server closed -+ whitelist-message: You are not white-listed on this server! -+ log-commands: true -+ command-complete: true -+ spam-exclusions: -+ - /skill -+world-settings: -+ default: -+ growth-chunks-per-tick: 650 -+ mob-spawn-range: 4 -+ random-light-updates: false -+ aggregate-chunkticks: 4 -+ wheat-growth-modifier: 100 -+ cactus-growth-modifier: 100 -+ melon-growth-modifier: 100 -+ pumpkin-growth-modifier: 100 -+ sugar-growth-modifier: 100 -+ tree-growth-modifier: 100 -+ mushroom-growth-modifier: 100 -+ info: true -+ world: -+ growth-chunks-per-tick: 1000 -+ world_nether: -+ growth-chunks-per-tick: 0 -+ random-light-updates: true - spawn-limits: - monsters: 70 - animals: 15 +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index bf297bc..38bd7ba 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -6,7 +6,6 @@ import java.io.IOException; + import java.lang.reflect.InvocationTargetException; + import java.lang.reflect.Method; + import java.lang.reflect.Modifier; +-import java.util.List; + import java.util.logging.Level; + import org.bukkit.Bukkit; + import org.bukkit.configuration.file.YamlConfiguration; +@@ -84,15 +83,21 @@ public class SpigotConfig + return config.getInt( path, config.getInt( path ) ); + } + +- private List getList(String path, T def) ++ private static String getString(String path, String def) + { + config.addDefault( path, def ); +- return (List) config.getList( path, config.getList( path ) ); ++ return config.getString( path, config.getString( path ) ); + } + +- private static String getString(String path, String def) ++ public static boolean tabComplete = true; ++ private static void tabComplete() + { +- config.addDefault( path, def ); +- return config.getString( path, config.getString( path ) ); ++ tabComplete = getBoolean( "commands.tab-complete", tabComplete ); ++ } ++ ++ public static boolean logCommands = true; ++ private static void logCommands() ++ { ++ logCommands = getBoolean( "commands.log", logCommands ); + } + } +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 4e1bdcf..18278c6 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -61,4 +61,57 @@ public class SpigotWorldConfig + chunksPerTick = getInt( "chunks-per-tick", chunksPerTick ); + log( "Chunks to Grow per Tick: " + chunksPerTick ); + } ++ ++ public boolean randomLightUpdates = false; ++ private void randomLightUpdates() ++ { ++ randomLightUpdates = getBoolean( "random-light-updates", randomLightUpdates ); ++ log( "Random Lighting Updates: " + randomLightUpdates ); ++ } ++ ++ public int mobSpawnRange = 4; ++ private void mobSpawnRange() ++ { ++ mobSpawnRange = getInt( "mob-spawn-range", mobSpawnRange ); ++ log( "Mob Spawn Range: " + mobSpawnRange ); ++ } ++ ++ public int tickAggregate = 4; ++ private void tickAggregate() ++ { ++ tickAggregate = getInt( "tick-aggregate", tickAggregate ); ++ log( "Ticks to Aggregate: " + tickAggregate ); ++ } ++ ++ // Crop growth rates ++ public int cactusModifier = 100; ++ public int caneModifier = 100; ++ public int melonModifier = 100; ++ public int mushroomModifier = 100; ++ public int pumpkinModifier = 100; ++ public int saplingModifier = 100; ++ public int wheatModifier = 100; ++ private void growthModifiers() ++ { ++ cactusModifier = getInt( "growth.cactus-modifier", cactusModifier ); ++ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ ++ caneModifier = getInt( "growth.cane-modifier", caneModifier ); ++ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ ++ melonModifier = getInt( "growth.melon-modifier", melonModifier ); ++ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ ++ mushroomModifier = getInt( "growth.mushroom-modifier", mushroomModifier ); ++ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ ++ pumpkinModifier = getInt( "growth.pumpkin-modifier", pumpkinModifier ); ++ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ ++ saplingModifier = getInt( "growth.sapling-modifier", saplingModifier ); ++ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ ++ wheatModifier = getInt( "growth.wheat-modifier", wheatModifier ); ++ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ } + } -- 1.8.1.2 From 9c9a514b7722a32e3052885f7c7c0c436f810368 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 18:41:59 +1000 Subject: [PATCH 06/40] Merge tweaks --- .../0009-Proxy-IP-Filter.patch | 103 +++++++++--------- .../0010-Merge-tweaks-and-configuration.patch | 89 +++++---------- .../0012-Async-Operation-Catching.patch | 18 +-- 3 files changed, 89 insertions(+), 121 deletions(-) diff --git a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch index 44554c2..5227af6 100644 --- a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch +++ b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch @@ -1,87 +1,86 @@ -From e5f922057b09dca486eb700c38c9cf890ac4849e Mon Sep 17 00:00:00 2001 +From 6a5eaf4b83d8b0603b9088518922f4f19ac9f053 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..fcd4136 100644 +index 0686ba0..1254e63 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 { -+ if (org.bukkit.craftbukkit.Spigot.filterIp(pendingConnection)) return; // Spigot ++ if (org.spigotmc.SpamHaus.filterIp(pendingConnection)) return; // 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..fd90979 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -1,19 +1,49 @@ - package org.bukkit.craftbukkit; - +diff --git a/src/main/java/org/spigotmc/SpamHaus.java b/src/main/java/org/spigotmc/SpamHaus.java +new file mode 100644 +index 0000000..55d8d12 +--- /dev/null ++++ b/src/main/java/org/spigotmc/SpamHaus.java +@@ -0,0 +1,44 @@ ++package org.spigotmc; ++ +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 class SpamHaus ++{ + -+ public static boolean filterIp(PendingConnection con) { -+ if (filterIps) { -+ try { ++ private SpamHaus() ++ { ++ } ++ ++ public static boolean filterIp(PendingConnection con) ++ { ++ if ( SpigotConfig.preventProxies ) ++ { ++ try ++ { + InetAddress address = con.getSocket().getInetAddress(); + String ip = address.getHostAddress(); + -+ if (!address.isLoopbackAddress()) { -+ String[] split = ip.split("\\."); ++ 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("."); ++ 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"); ++ 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" ); + return true; + } + } -+ } catch (Exception ex) { ++ } catch ( Exception ex ) ++ { + } + } + return false; ++ } ++} +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index 38bd7ba..d647943 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -100,4 +100,10 @@ public class SpigotConfig + { + logCommands = getBoolean( "commands.log", logCommands ); + } ++ ++ public static boolean preventProxies = false; ++ private static void preventProxies() ++ { ++ preventProxies = getBoolean( "settings.prevent-proxies", preventProxies ); + } } -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 67c6c5e..b445808 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.1.2 diff --git a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch index 780794c..3074a58 100644 --- a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch +++ b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch @@ -1,4 +1,4 @@ -From 7822f8ff9ad9fc4ef9b4a9a3e3e105107de2f4a0 Mon Sep 17 00:00:00 2001 +From 09bfa8a119a405550b9519bd84f11e3ae0f70f6b 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 @@ -6,7 +6,7 @@ Subject: [PATCH] Merge tweaks and configuration This allows the merging of Experience orbs, as well as the configuration of the merge radius of items. Additionally it refactors the merge algorithm to be a better experience for players. diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 0225f53..294ab8f 100644 +index 0225f53..67567fa 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -114,7 +114,10 @@ public class EntityItem extends Entity { @@ -15,7 +15,7 @@ index 0225f53..294ab8f 100644 private void g() { - Iterator iterator = this.world.a(EntityItem.class, this.boundingBox.grow(0.5D, 0.0D, 0.5D)).iterator(); + // Spigot start -+ double radius = world.getWorld().itemMergeRadius; ++ float radius = world.spigotConfig.itemMerge; + Iterator iterator = this.world.a(EntityItem.class, this.boundingBox.grow(radius, radius, radius)).iterator(); + // Spigot end @@ -41,17 +41,17 @@ index 0225f53..294ab8f 100644 } } else { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index dcad74f..a0c61a1 100644 +index afe3e4d..d7e5301 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -955,6 +955,23 @@ public abstract class World implements IBlockAccess { +@@ -957,6 +957,23 @@ public abstract class World implements IBlockAccess { // Not all projectiles extend EntityProjectile, so check for Bukkit interface instead event = CraftEventFactory.callProjectileLaunchEvent(entity); } + // Spigot start + else if (entity instanceof EntityExperienceOrb) { + EntityExperienceOrb xp = (EntityExperienceOrb) entity; -+ double radius = this.getWorld().expMergeRadius; ++ float radius = spigotConfig.expMerge; + if (radius > 0) { + List entities = this.getEntities(entity, entity.boundingBox.grow(radius, radius, radius)); + for (Entity e : entities) { @@ -68,60 +68,29 @@ index dcad74f..a0c61a1 100644 if (event != null && (event.isCancelled() || entity.dead)) { entity.dead = true; -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 9789ba4..d0e6d6f 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -80,6 +80,9 @@ public class CraftWorld implements World { - public int sugarGrowthModifier = 100; - public int treeGrowthModifier = 100; - public int mushroomGrowthModifier = 100; -+ // Merge radius: -+ public double itemMergeRadius = 3.5; -+ public double expMergeRadius = 3.5; - // Spigot end - - // Spigot start -@@ -114,6 +117,8 @@ public class CraftWorld implements World { - sugarGrowthModifier = configuration.getInt( "world-settings.default.sugar-growth-modifier", sugarGrowthModifier ); - treeGrowthModifier = configuration.getInt( "world-settings.default.tree-growth-modifier", treeGrowthModifier ); - mushroomGrowthModifier = configuration.getInt( "world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier ); -+ itemMergeRadius = configuration.getDouble("world-settings.default.item-merge-radius", itemMergeRadius); -+ expMergeRadius = configuration.getDouble("world-settings.default.exp-merge-radius", expMergeRadius); - - // Override defaults with world specific, if they exist - info = configuration.getBoolean( "world-settings." + name + ".info", info ); -@@ -128,6 +133,8 @@ public class CraftWorld implements World { - sugarGrowthModifier = configuration.getInt( "world-settings." + name + ".sugar-growth-modifier", sugarGrowthModifier ); - treeGrowthModifier = configuration.getInt( "world-settings." + name + ".tree-growth-modifier", treeGrowthModifier ); - mushroomGrowthModifier = configuration.getInt( "world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier ); -+ itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius); -+ expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius); - - if ( info ) - { -@@ -144,6 +151,8 @@ public class CraftWorld implements World { - server.getLogger().info( "Sugar Growth Modifier: " + sugarGrowthModifier ); - server.getLogger().info( "Tree Growth Modifier: " + treeGrowthModifier ); - server.getLogger().info( "Mushroom Growth Modifier: " + mushroomGrowthModifier ); -+ server.getLogger().info( "Item Merge Radius: " + itemMergeRadius ); -+ server.getLogger().info( "Exp Merge Radius: " + expMergeRadius ); - server.getLogger().info( "-------------------------------------------------" ); - } - // Spigot end -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index b445808..56873b6 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -37,6 +37,8 @@ world-settings: - mob-spawn-range: 4 - random-light-updates: false - aggregate-chunkticks: 4 -+ item-merge-radius: 3.5 -+ exp-merge-radius: 3.5 - wheat-growth-modifier: 100 - cactus-growth-modifier: 100 - melon-growth-modifier: 100 +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 18278c6..4c16ed7 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -114,4 +114,18 @@ public class SpigotWorldConfig + wheatModifier = getInt( "growth.wheat-modifier", wheatModifier ); + log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + } ++ ++ public float itemMerge = 2.5F; ++ private void itemMerge() ++ { ++ itemMerge = getFloat( "merge-radius.item", itemMerge ); ++ log( "Item Merge Radius: " + itemMerge ); ++ } ++ ++ public float expMerge = 3.0F; ++ private void expMerge() ++ { ++ expMerge = getFloat( "merge-radius.exp", expMerge ); ++ log( "Experience Merge Radius: " + expMerge ); ++ } + } -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0012-Async-Operation-Catching.patch b/CraftBukkit-Patches/0012-Async-Operation-Catching.patch index 14c764f..01cafd6 100644 --- a/CraftBukkit-Patches/0012-Async-Operation-Catching.patch +++ b/CraftBukkit-Patches/0012-Async-Operation-Catching.patch @@ -1,4 +1,4 @@ -From 10ca32f973eaccc4eab615b966b195c90555c916 Mon Sep 17 00:00:00 2001 +From a8c529d46c95e00dc30e16fec26a5af608e2db78 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 7 Mar 2013 20:12:46 +1100 Subject: [PATCH] Async Operation Catching @@ -46,10 +46,10 @@ index 5c03732..5f3c780 100644 this.trackedPlayers.remove(entityplayer); entityplayer.removeQueue.add(Integer.valueOf(this.tracker.id)); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a0c61a1..1afc717 100644 +index d7e5301..e353caa 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -924,6 +924,7 @@ public abstract class World implements IBlockAccess { +@@ -926,6 +926,7 @@ public abstract class World implements IBlockAccess { } public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason @@ -57,7 +57,7 @@ index a0c61a1..1afc717 100644 if (entity == null) return false; // CraftBukkit end -@@ -1030,6 +1031,7 @@ public abstract class World implements IBlockAccess { +@@ -1032,6 +1033,7 @@ public abstract class World implements IBlockAccess { } public void removeEntity(Entity entity) { @@ -65,7 +65,7 @@ index a0c61a1..1afc717 100644 entity.die(); if (entity instanceof EntityHuman) { this.players.remove(entity); -@@ -2447,6 +2449,7 @@ public abstract class World implements IBlockAccess { +@@ -2449,6 +2451,7 @@ public abstract class World implements IBlockAccess { } public void a(List list) { @@ -74,10 +74,10 @@ index a0c61a1..1afc717 100644 Entity entity = null; for (int i = 0; i < list.size(); ++i) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d0e6d6f..d49393d 100644 +index c0fb528..edc59b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -239,6 +239,7 @@ public class CraftWorld implements World { +@@ -160,6 +160,7 @@ public class CraftWorld implements World { } public boolean unloadChunkRequest(int x, int z, boolean safe) { @@ -85,7 +85,7 @@ index d0e6d6f..d49393d 100644 if (safe && isChunkInUse(x, z)) { return false; } -@@ -249,6 +250,7 @@ public class CraftWorld implements World { +@@ -170,6 +171,7 @@ public class CraftWorld implements World { } public boolean unloadChunk(int x, int z, boolean save, boolean safe) { @@ -93,7 +93,7 @@ index d0e6d6f..d49393d 100644 if (safe && isChunkInUse(x, z)) { return false; } -@@ -316,6 +318,7 @@ public class CraftWorld implements World { +@@ -237,6 +239,7 @@ public class CraftWorld implements World { } public boolean loadChunk(int x, int z, boolean generate) { From 9d2daf140bcfdb377841a3de0f15afc0d965ab88 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 18:52:23 +1000 Subject: [PATCH 07/40] Orebfuscator --- CraftBukkit-Patches/0013-View-Distance.patch | 64 ++----- ...0016-Sync-Free-Chunk-Reference-Cache.patch | 6 +- .../0017-Highly-Optimized-Tick-Loop.patch | 15 +- .../0018-Improved-Timings-System.patch | 36 ++-- CraftBukkit-Patches/0019-Orebfuscator.patch | 172 +++++++----------- .../0021-Handle-Null-Tile-Entities.patch | 6 +- 6 files changed, 109 insertions(+), 190 deletions(-) diff --git a/CraftBukkit-Patches/0013-View-Distance.patch b/CraftBukkit-Patches/0013-View-Distance.patch index 9f948be..f7fc24a 100644 --- a/CraftBukkit-Patches/0013-View-Distance.patch +++ b/CraftBukkit-Patches/0013-View-Distance.patch @@ -1,4 +1,4 @@ -From 7b1f1f56d04030711b34d012ffc342f5fe9c9bb4 Mon Sep 17 00:00:00 2001 +From 98da2b7084a875327ad23ed8a913bf02e0e36fb6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:52:41 +1100 Subject: [PATCH] View Distance @@ -19,60 +19,34 @@ 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 4a8d3f4..5375cb3 100644 +index 6c3fcf1..614a17f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -49,7 +49,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -48,7 +48,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate // CraftBukkit end this.server = minecraftserver; this.tracker = new EntityTracker(this); - this.manager = new PlayerChunkMap(this, minecraftserver.getPlayerList().o()); -+ this.manager = new PlayerChunkMap(this, getWorld().viewDistance); // Spigot ++ this.manager = new PlayerChunkMap(this, spigotConfig.viewDistance); // Spigot if (this.entitiesById == null) { this.entitiesById = new IntHashMap(); } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d49393d..4d022bd 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -83,6 +83,7 @@ public class CraftWorld implements World { - // Merge radius: - public double itemMergeRadius = 3.5; - public double expMergeRadius = 3.5; -+ public int viewDistance; - // Spigot end - - // Spigot start -@@ -136,6 +137,9 @@ public class CraftWorld implements World { - itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius); - expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius); - -+ viewDistance = Bukkit.getServer().getViewDistance(); -+ viewDistance = configuration.getInt( "world-settings." + name + ".view-distance", viewDistance ); +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 4c16ed7..de5d17e 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -128,4 +128,11 @@ public class SpigotWorldConfig + expMerge = getFloat( "merge-radius.exp", expMerge ); + log( "Experience Merge Radius: " + expMerge ); + } + - if ( info ) - { - server.getLogger().info( "-------------- Spigot ----------------" ); -@@ -153,6 +157,7 @@ public class CraftWorld implements World { - server.getLogger().info( "Mushroom Growth Modifier: " + mushroomGrowthModifier ); - server.getLogger().info( "Item Merge Radius: " + itemMergeRadius ); - server.getLogger().info( "Exp Merge Radius: " + expMergeRadius ); -+ server.getLogger().info( "View distance: " + viewDistance ); - server.getLogger().info( "-------------------------------------------------" ); - } - // Spigot end -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 56873b6..fe257e2 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -50,6 +50,7 @@ world-settings: - world: - growth-chunks-per-tick: 1000 - world_nether: -+ view-distance: 5 - growth-chunks-per-tick: 0 - random-light-updates: true - spawn-limits: ++ public int viewDistance; ++ private void viewDistance() ++ { ++ viewDistance = getInt( "view-distance", Bukkit.getViewDistance() ); ++ log( "View Distance: " + viewDistance ); ++ } + } -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0016-Sync-Free-Chunk-Reference-Cache.patch b/CraftBukkit-Patches/0016-Sync-Free-Chunk-Reference-Cache.patch index bd74ab0..c62b477 100644 --- a/CraftBukkit-Patches/0016-Sync-Free-Chunk-Reference-Cache.patch +++ b/CraftBukkit-Patches/0016-Sync-Free-Chunk-Reference-Cache.patch @@ -1,14 +1,14 @@ -From a0681b71d66fe6a689ce28fd157ca6d7c07ff3a9 Mon Sep 17 00:00:00 2001 +From 27aa389075a5b22ffad6e7c8d4d42b9315aa1bc0 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Wed, 16 Jan 2013 15:27:22 -0600 Subject: [PATCH] Sync Free Chunk Reference Cache diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1afc717..c00aa57 100644 +index e353caa..a81e06d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -299,15 +299,13 @@ public abstract class World implements IBlockAccess { +@@ -301,15 +301,13 @@ public abstract class World implements IBlockAccess { // CraftBukkit start public Chunk getChunkAt(int i, int j) { diff --git a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch index e7c1784..925b62e 100644 --- a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch @@ -1,4 +1,4 @@ -From 1925b6e7b2f1f3f5673a20d5fd5e72c6c3effe2a Mon Sep 17 00:00:00 2001 +From 47772fc5f951855c7814afa967489d5ce454554a Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 12:28:17 +1100 Subject: [PATCH] Highly Optimized Tick Loop @@ -75,19 +75,6 @@ index 3e134fb..3c80340 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 fd90979..67477f4 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -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")); -+ - 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); 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 diff --git a/CraftBukkit-Patches/0018-Improved-Timings-System.patch b/CraftBukkit-Patches/0018-Improved-Timings-System.patch index efdbc12..c85bba3 100644 --- a/CraftBukkit-Patches/0018-Improved-Timings-System.patch +++ b/CraftBukkit-Patches/0018-Improved-Timings-System.patch @@ -1,4 +1,4 @@ -From 5f3f94a427dbc6c59a8cb7c9171f4961699ec34f Mon Sep 17 00:00:00 2001 +From 48b529e33646533eb0028189bf7836e56423e991 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 10 Jan 2013 00:18:11 -0500 Subject: [PATCH] Improved Timings System @@ -213,7 +213,7 @@ index 3c80340..db396b3 100644 this.methodProfiler.b(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f6885d6..86a0acc 100644 +index 52fa75a..93082ff 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -968,6 +968,7 @@ public class PlayerConnection extends Connection { @@ -233,7 +233,7 @@ index f6885d6..86a0acc 100644 } try { - if (server.logCommands) this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // Spigot + if (org.spigotmc.SpigotConfig.logCommands) this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // Spigot if (this.server.dispatchCommand(event.getPlayer(), event.getMessage().substring(1))) { + org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot return; @@ -266,7 +266,7 @@ index db3fc42..ffa9bb6 100644 private static Map b = new HashMap(); protected World world; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c00aa57..4a5894a 100644 +index a81e06d..da069f7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -13,6 +13,7 @@ import java.util.concurrent.Callable; @@ -277,16 +277,16 @@ index c00aa57..4a5894a 100644 import org.bukkit.craftbukkit.util.UnsafeList; import org.bukkit.generator.ChunkGenerator; import org.bukkit.craftbukkit.CraftServer; -@@ -122,6 +123,8 @@ public abstract class World implements IBlockAccess { - int lastZAccessed = Integer.MIN_VALUE; +@@ -123,6 +124,8 @@ public abstract class World implements IBlockAccess { final Object chunkLock = new Object(); + public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot + public final SpigotTimings.WorldTimingsHandler timings; // Spigot + public CraftWorld getWorld() { return this.world; } -@@ -199,6 +202,7 @@ public abstract class World implements IBlockAccess { +@@ -201,6 +204,7 @@ public abstract class World implements IBlockAccess { this.a(); this.getServer().addWorld(this.world); // CraftBukkit @@ -294,7 +294,7 @@ index c00aa57..4a5894a 100644 } protected abstract IChunkProvider j(); -@@ -1271,6 +1275,7 @@ public abstract class World implements IBlockAccess { +@@ -1273,6 +1277,7 @@ public abstract class World implements IBlockAccess { this.f.clear(); this.methodProfiler.c("regular"); @@ -302,7 +302,7 @@ index c00aa57..4a5894a 100644 for (i = 0; i < this.entityList.size(); ++i) { entity = (Entity) this.entityList.get(i); -@@ -1293,7 +1298,9 @@ public abstract class World implements IBlockAccess { +@@ -1295,7 +1300,9 @@ public abstract class World implements IBlockAccess { this.methodProfiler.a("tick"); if (!entity.dead) { try { @@ -312,7 +312,7 @@ index c00aa57..4a5894a 100644 } catch (Throwable throwable1) { crashreport = CrashReport.a(throwable1, "Ticking entity"); crashreportsystemdetails = crashreport.a("Entity being ticked"); -@@ -1318,7 +1325,9 @@ public abstract class World implements IBlockAccess { +@@ -1320,7 +1327,9 @@ public abstract class World implements IBlockAccess { this.methodProfiler.b(); } @@ -322,7 +322,7 @@ index c00aa57..4a5894a 100644 this.N = true; Iterator iterator = this.tileEntityList.iterator(); -@@ -1333,8 +1342,11 @@ public abstract class World implements IBlockAccess { +@@ -1335,8 +1344,11 @@ public abstract class World implements IBlockAccess { if (!tileentity.r() && tileentity.o() && this.isLoaded(tileentity.x, tileentity.y, tileentity.z)) { try { @@ -334,7 +334,7 @@ index c00aa57..4a5894a 100644 crashreport = CrashReport.a(throwable2, "Ticking tile entity"); crashreportsystemdetails = crashreport.a("Tile entity being ticked"); tileentity.a(crashreportsystemdetails); -@@ -1354,6 +1366,8 @@ public abstract class World implements IBlockAccess { +@@ -1356,6 +1368,8 @@ public abstract class World implements IBlockAccess { } } @@ -343,7 +343,7 @@ index c00aa57..4a5894a 100644 this.N = false; if (!this.b.isEmpty()) { this.tileEntityList.removeAll(this.b); -@@ -1392,6 +1406,7 @@ public abstract class World implements IBlockAccess { +@@ -1394,6 +1408,7 @@ public abstract class World implements IBlockAccess { this.a.clear(); } @@ -351,7 +351,7 @@ index c00aa57..4a5894a 100644 this.methodProfiler.b(); this.methodProfiler.b(); } -@@ -1414,6 +1429,7 @@ public abstract class World implements IBlockAccess { +@@ -1416,6 +1431,7 @@ public abstract class World implements IBlockAccess { byte b0 = 32; if (!flag || this.e(i - b0, 0, j - b0, i + b0, 0, j + b0)) { @@ -359,7 +359,7 @@ index c00aa57..4a5894a 100644 entity.U = entity.locX; entity.V = entity.locY; entity.W = entity.locZ; -@@ -1475,6 +1491,7 @@ public abstract class World implements IBlockAccess { +@@ -1477,6 +1493,7 @@ public abstract class World implements IBlockAccess { entity.passenger = null; } } @@ -368,10 +368,10 @@ index c00aa57..4a5894a 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 5375cb3..7b8e70c 100644 +index 614a17f..69d955f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -184,9 +184,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -183,9 +183,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate // CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals long time = this.worldData.getTime(); if (this.getGameRules().getBoolean("doMobSpawning") && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) { @@ -384,7 +384,7 @@ index 5375cb3..7b8e70c 100644 this.methodProfiler.c("chunkSource"); this.chunkProvider.unloadChunks(); int j = this.a(1.0F); -@@ -197,21 +200,36 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -196,21 +199,36 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate this.worldData.setTime(this.worldData.getTime() + 1L); this.worldData.setDayTime(this.worldData.getDayTime() + 1L); diff --git a/CraftBukkit-Patches/0019-Orebfuscator.patch b/CraftBukkit-Patches/0019-Orebfuscator.patch index 04bbb7e..a3bb2c1 100644 --- a/CraftBukkit-Patches/0019-Orebfuscator.patch +++ b/CraftBukkit-Patches/0019-Orebfuscator.patch @@ -1,47 +1,47 @@ -From d270363d40175512df3af1f7dbbb4722d6ab684a Mon Sep 17 00:00:00 2001 +From c50921dc69979fb97674486de51a073d19273170 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 17d837d..d38eb4d 100644 +index 17d837d..c7cd0ca 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -94,6 +94,7 @@ public class EntityFallingBlock extends Entity { } this.world.setAir(i, j, k); -+ org.spigotmc.OrebfuscatorManager.updateNearbyBlocks(world, i, j, k); // Spigot ++ world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, i, j, k); // Spigot } if (this.onGround) { diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index ef220c1..ae1cee9 100644 +index ef220c1..2063769 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -240,6 +240,7 @@ public class Explosion { j = chunkposition.y; k = chunkposition.z; l = this.world.getTypeId(i, j, k); -+ org.spigotmc.OrebfuscatorManager.updateNearbyBlocks(world, i, j, k); // Spigot ++ world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, i, j, k); // Spigot if (flag) { double d0 = (double) ((float) i + this.world.random.nextFloat()); double d1 = (double) ((float) j + this.world.random.nextFloat()); diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java -index d11c0ea..7711629 100644 +index d11c0ea..efe102e 100644 --- a/src/main/java/net/minecraft/server/Packet51MapChunk.java +++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java @@ -46,6 +46,7 @@ public class Packet51MapChunk extends Packet { this.d = chunkmap.c; this.c = chunkmap.b; -+ org.spigotmc.OrebfuscatorManager.obfuscateSync(chunk.x, chunk.z, i, chunkmap.a, chunk.world); // Spigot ++ chunk.world.spigotConfig.antiXrayInstance.obfuscateSync(chunk.x, chunk.z, i, chunkmap.a, chunk.world); // Spigot try { this.inflatedBuffer = chunkmap.a; diff --git a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java -index 129dc4f..ce28495 100644 +index 129dc4f..a2cd9b0 100644 --- a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java +++ b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java @@ -28,6 +28,7 @@ public class Packet56MapChunkBulk extends Packet { @@ -79,7 +79,7 @@ index 129dc4f..ce28495 100644 + int finalBufferSize = 0; + // Obfuscate all sections + for (int i = 0; i < a.length; i++) { -+ org.spigotmc.OrebfuscatorManager.obfuscate(c[i], d[i], a[i], inflatedBuffers[i], world); ++ world.spigotConfig.antiXrayInstance.obfuscate(c[i], d[i], a[i], inflatedBuffers[i], world); + finalBufferSize += inflatedBuffers[i].length; + } + @@ -95,110 +95,45 @@ index 129dc4f..ce28495 100644 Deflater deflater = localDeflater.get(); deflater.reset(); diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 1243d1d..e45bcd2 100644 +index 1243d1d..9ec8997 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -184,6 +184,7 @@ public class PlayerInteractManager { this.o = j1; } } -+ org.spigotmc.OrebfuscatorManager.updateNearbyBlocks(world, i, j, k); // Spigot ++ world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, i, j, k); // Spigot } } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c234cac..82dfef1 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -163,6 +163,12 @@ public final class CraftServer implements Server { - private final BooleanWrapper online = new BooleanWrapper(); - public CraftScoreboardManager scoreboardManager; - -+ // Orebfuscator use -+ public boolean orebfuscatorEnabled = false; -+ public int orebfuscatorEngineMode = 1; -+ public List orebfuscatorDisabledWorlds; -+ public List orebfuscatorBlocks; -+ - private final class BooleanWrapper { - private boolean value = true; - } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4d022bd..0a39ed3 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -84,6 +84,7 @@ public class CraftWorld implements World { - public double itemMergeRadius = 3.5; - public double expMergeRadius = 3.5; - public int viewDistance; -+ public boolean obfuscated = false; - // Spigot end - - // Spigot start -@@ -139,6 +140,7 @@ public class CraftWorld implements World { - - viewDistance = Bukkit.getServer().getViewDistance(); - viewDistance = configuration.getInt( "world-settings." + name + ".view-distance", viewDistance ); -+ obfuscated = world.getServer().orebfuscatorEnabled && !world.getServer().orebfuscatorDisabledWorlds.contains( name ); - - if ( info ) - { -@@ -158,6 +160,7 @@ public class CraftWorld implements World { - server.getLogger().info( "Item Merge Radius: " + itemMergeRadius ); - server.getLogger().info( "Exp Merge Radius: " + expMergeRadius ); - server.getLogger().info( "View distance: " + viewDistance ); -+ server.getLogger().info( "Orebfuscator: " + obfuscated ); - server.getLogger().info( "-------------------------------------------------" ); - } - // Spigot end -diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index 67477f4..e5004b3 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -19,6 +19,14 @@ 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); -+ server.orebfuscatorDisabledWorlds = configuration.getStringList("orebfuscator.disabled-worlds"); -+ server.orebfuscatorBlocks = configuration.getShortList("orebfuscator.blocks"); -+ if (server.orebfuscatorEngineMode != 1 && server.orebfuscatorEngineMode != 2) { -+ server.orebfuscatorEngineMode = 1; -+ } -+ - if (server.chunkGCPeriod == 0) { - server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!"); - } -diff --git a/src/main/java/org/spigotmc/OrebfuscatorManager.java b/src/main/java/org/spigotmc/OrebfuscatorManager.java +diff --git a/src/main/java/org/spigotmc/AntiXray.java b/src/main/java/org/spigotmc/AntiXray.java new file mode 100644 -index 0000000..aa1ddfc +index 0000000..74ee741 --- /dev/null -+++ b/src/main/java/org/spigotmc/OrebfuscatorManager.java -@@ -0,0 +1,204 @@ ++++ b/src/main/java/org/spigotmc/AntiXray.java +@@ -0,0 +1,203 @@ +package org.spigotmc; + +import gnu.trove.set.TByteSet; +import gnu.trove.set.hash.TByteHashSet; +import net.minecraft.server.Block; -+import net.minecraft.server.MinecraftServer; +import net.minecraft.server.World; + -+public class OrebfuscatorManager ++public class AntiXray +{ + + private static final CustomTimingsHandler update = new CustomTimingsHandler( "xray - update" ); + private static final CustomTimingsHandler obfuscate = new CustomTimingsHandler( "xray - obfuscate" ); + /*========================================================================*/ + // Used to keep track of which blocks to obfuscate -+ private static final boolean[] obfuscateBlocks = new boolean[ Short.MAX_VALUE ]; ++ private final boolean[] obfuscateBlocks = new boolean[ Short.MAX_VALUE ]; + // Used to select a random replacement ore -+ private static byte[] replacementOres; ++ private byte[] replacementOres; + -+ static ++ public AntiXray(SpigotWorldConfig config) + { + // Set all listed blocks as true to be obfuscated -+ for ( short id : MinecraftServer.getServer().server.orebfuscatorBlocks ) ++ for ( short id : config.blocks ) + { + obfuscateBlocks[id] = true; + } @@ -227,9 +162,9 @@ index 0000000..aa1ddfc + * Starts the timings handler, then updates all blocks within the set radius + * of the given coordinate, revealing them if they are hidden ores. + */ -+ public static void updateNearbyBlocks(World world, int x, int y, int z) ++ public void updateNearbyBlocks(World world, int x, int y, int z) + { -+ if ( world.getWorld().obfuscated ) ++ if ( world.spigotConfig.antiXray ) + { + update.startTiming(); + updateNearbyBlocks( world, x, y, z, 2 ); // 2 is the radius, we shouldn't change it as that would make it exponentially slower @@ -241,9 +176,9 @@ index 0000000..aa1ddfc + * Starts the timings handler, and then removes all non exposed ores from + * the chunk buffer. + */ -+ public static void obfuscateSync(int chunkX, int chunkY, int bitmask, byte[] buffer, World world) ++ public void obfuscateSync(int chunkX, int chunkY, int bitmask, byte[] buffer, World world) + { -+ if ( world.getWorld().obfuscated ) ++ if ( world.spigotConfig.antiXray ) + { + obfuscate.startTiming(); + obfuscate( chunkX, chunkY, bitmask, buffer, world ); @@ -254,10 +189,10 @@ index 0000000..aa1ddfc + /** + * Removes all non exposed ores from the chunk buffer. + */ -+ public static void obfuscate(int chunkX, int chunkY, int bitmask, byte[] buffer, World world) ++ public void obfuscate(int chunkX, int chunkY, int bitmask, byte[] buffer, World world) + { + // If the world is marked as obfuscated -+ if ( world.getWorld().obfuscated ) ++ if ( world.spigotConfig.antiXray ) + { + // Initial radius to search around for air + int initialRadius = 1; @@ -297,7 +232,7 @@ index 0000000..aa1ddfc + // On the otherhand, if radius is 0, or the nearby blocks are all non air, we can obfuscate + if ( initialRadius == 0 || !hasTransparentBlockAdjacent( world, startX + x, ( i << 4 ) + y, startZ + z, initialRadius ) ) + { -+ switch ( world.getServer().orebfuscatorEngineMode ) ++ switch ( world.spigotConfig.engineMode ) + { + case 1: + // Replace with stone @@ -328,7 +263,7 @@ index 0000000..aa1ddfc + } + } + -+ private static void updateNearbyBlocks(World world, int x, int y, int z, int radius) ++ private void updateNearbyBlocks(World world, int x, int y, int z, int radius) + { + // If the block in question is loaded + if ( world.isLoaded( x, y, z ) ) @@ -380,20 +315,43 @@ index 0000000..aa1ddfc + || hasTransparentBlockAdjacent( world, x, y, z - 1, radius - 1 ) ) ); + } +} -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index fe257e2..7860ccc 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -81,3 +81,9 @@ database: - driver: org.sqlite.JDBC - password: walrus - url: jdbc:sqlite:{DIR}{NAME}.db -+orebfuscator: -+ enable: false -+ engine-mode: 1 -+ disabled-worlds: -+ - world_the_end -+ blocks: [1, 5, 14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130] +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index de5d17e..2f514a0 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -1,5 +1,6 @@ + package org.spigotmc; + ++import java.util.Arrays; + import java.util.List; + import org.bukkit.Bukkit; + import org.bukkit.configuration.file.YamlConfiguration; +@@ -135,4 +136,25 @@ public class SpigotWorldConfig + viewDistance = getInt( "view-distance", Bukkit.getViewDistance() ); + log( "View Distance: " + viewDistance ); + } ++ ++ public boolean antiXray = true; ++ public int engineMode = 1; ++ public List blocks = Arrays.asList( new Short[] ++ { ++ 1, 5, 14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130 ++ } ); ++ public AntiXray antiXrayInstance; ++ private void antiXray() ++ { ++ antiXray = getBoolean( "anti-xray.enabled", antiXray ); ++ log( "Anti X-Ray: " + antiXray ); ++ ++ engineMode = getInt( "anti-xray.engine-mode", engineMode ); ++ log( "\tEngine Mode: " + engineMode ); ++ ++ blocks = getList( "anti-xray.blocks", blocks ); ++ log( "\tBlocks: " + blocks ); ++ ++ antiXrayInstance = new AntiXray( this ); ++ } + } -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0021-Handle-Null-Tile-Entities.patch b/CraftBukkit-Patches/0021-Handle-Null-Tile-Entities.patch index fc77974..17ec48d 100644 --- a/CraftBukkit-Patches/0021-Handle-Null-Tile-Entities.patch +++ b/CraftBukkit-Patches/0021-Handle-Null-Tile-Entities.patch @@ -1,14 +1,14 @@ -From 4cc67e6337594077f65722dff9e59db7ea30204f Mon Sep 17 00:00:00 2001 +From 6231d399bc448b884b4b85b68f3ef632605b1ebd Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 09:20:19 +1100 Subject: [PATCH] Handle Null Tile Entities diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4a5894a..3c6b51a 100644 +index da069f7..d4d8f04 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1333,6 +1333,13 @@ public abstract class World implements IBlockAccess { +@@ -1335,6 +1335,13 @@ public abstract class World implements IBlockAccess { while (iterator.hasNext()) { TileEntity tileentity = (TileEntity) iterator.next(); From 1176626e5e105845eff74661fc4b6ab140321d00 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 19:00:26 +1000 Subject: [PATCH 08/40] Activation Range --- .../0022-Entity-Activation-Range.patch | 345 ++++++++---------- 1 file changed, 157 insertions(+), 188 deletions(-) diff --git a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch index e1abb0c..09fad96 100644 --- a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From b09d78b7f1cb674b6dffba57888d241c94ee16c6 Mon Sep 17 00:00:00 2001 +From 118a860a1790b95d1992033d9735aaa8c3e405af Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -9,7 +9,7 @@ This will drastically cut down on tick timings for entities that are not in rang This change can have dramatic impact on gameplay if configured too low. Balance according to your servers desired gameplay. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 978b6ef..401edcc 100644 +index 978b6ef..438a26a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -88,7 +88,7 @@ public abstract class Entity { @@ -28,7 +28,7 @@ index 978b6ef..401edcc 100644 + // Spigot start public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot -+ public final byte activationType = org.bukkit.craftbukkit.Spigot.initializeEntityActivationType(this); ++ public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); + public final boolean defaultActivationState; + public long activatedTick = 0; + public void inactiveTick() { } @@ -42,7 +42,7 @@ index 978b6ef..401edcc 100644 if (world != null) { this.dimension = world.worldProvider.dimension; + // Spigot start -+ this.defaultActivationState = org.bukkit.craftbukkit.Spigot.initializeEntityActivationState(this, world.getWorld()); ++ this.defaultActivationState = org.spigotmc.ActivationRange.initializeEntityActivationState(this, world.spigotConfig); + } else { + this.defaultActivationState = false; } @@ -118,33 +118,25 @@ index 58a4acb..35f3fea 100644 public EntityLiving(World world) { super(world); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3c6b51a..6de55ba 100644 +index d4d8f04..435ec52 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -13,6 +13,7 @@ import java.util.concurrent.Callable; - // CraftBukkit start - import org.bukkit.Bukkit; - import org.bukkit.craftbukkit.util.LongHashSet; -+import org.bukkit.craftbukkit.Spigot; // Spigot - import org.bukkit.craftbukkit.SpigotTimings; // Spigot - import org.bukkit.craftbukkit.util.UnsafeList; - import org.bukkit.generator.ChunkGenerator; -@@ -1275,6 +1276,7 @@ public abstract class World implements IBlockAccess { +@@ -1277,6 +1277,7 @@ public abstract class World implements IBlockAccess { this.f.clear(); this.methodProfiler.c("regular"); -+ org.bukkit.craftbukkit.Spigot.activateEntities(this); // Spigot ++ org.spigotmc.ActivationRange.activateEntities(this); // Spigot timings.entityTick.startTiming(); // Spigot for (i = 0; i < this.entityList.size(); ++i) { entity = (Entity) this.entityList.get(i); -@@ -1435,8 +1437,13 @@ public abstract class World implements IBlockAccess { +@@ -1437,8 +1438,13 @@ public abstract class World implements IBlockAccess { int j = MathHelper.floor(entity.locZ); byte b0 = 32; - if (!flag || this.e(i - b0, 0, j - b0, i + b0, 0, j + b0)) { - entity.tickTimer.startTiming(); // Spigot + // Spigot start -+ if (!Spigot.checkIfActive(entity)) { ++ if (!org.spigotmc.ActivationRange.checkIfActive(entity)) { + entity.ticksLived++; + entity.inactiveTick(); + } else { @@ -153,65 +145,28 @@ index 3c6b51a..6de55ba 100644 entity.U = entity.locX; entity.V = entity.locY; entity.W = entity.locZ; -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0a39ed3..ebf1a67 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -85,6 +85,10 @@ public class CraftWorld implements World { - public double expMergeRadius = 3.5; - public int viewDistance; - public boolean obfuscated = false; -+ // Activation ranges: -+ public int miscEntityActivationRange = 16; -+ public int animalEntityActivationRange = 32; -+ public int monsterEntityActivationRange = 32; - // Spigot end +diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +index f6e507e..4328ecf 100644 +--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java ++++ b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +@@ -29,6 +29,9 @@ public class SpigotTimings { - // Spigot start -@@ -119,8 +123,11 @@ public class CraftWorld implements World { - sugarGrowthModifier = configuration.getInt( "world-settings.default.sugar-growth-modifier", sugarGrowthModifier ); - treeGrowthModifier = configuration.getInt( "world-settings.default.tree-growth-modifier", treeGrowthModifier ); - mushroomGrowthModifier = configuration.getInt( "world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier ); -- itemMergeRadius = configuration.getDouble("world-settings.default.item-merge-radius", itemMergeRadius); -- expMergeRadius = configuration.getDouble("world-settings.default.exp-merge-radius", expMergeRadius); -+ itemMergeRadius = configuration.getDouble( "world-settings.default.item-merge-radius", itemMergeRadius ); -+ expMergeRadius = configuration.getDouble( "world-settings.default.exp-merge-radius", expMergeRadius ); -+ miscEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-misc" ); -+ animalEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-animals" ); -+ monsterEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-monsters" ); + public static final CustomTimingsHandler playerCommandTimer = new CustomTimingsHandler("** playerCommand"); - // Override defaults with world specific, if they exist - info = configuration.getBoolean( "world-settings." + name + ".info", info ); -@@ -135,8 +142,11 @@ public class CraftWorld implements World { - sugarGrowthModifier = configuration.getInt( "world-settings." + name + ".sugar-growth-modifier", sugarGrowthModifier ); - treeGrowthModifier = configuration.getInt( "world-settings." + name + ".tree-growth-modifier", treeGrowthModifier ); - mushroomGrowthModifier = configuration.getInt( "world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier ); -- itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius); -- expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius); -+ itemMergeRadius = configuration.getDouble( "world-settings." + name + ".item-merge-radius", itemMergeRadius ); -+ expMergeRadius = configuration.getDouble( "world-settings." + name + ".exp-merge-radius", expMergeRadius ); -+ miscEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-misc", miscEntityActivationRange ); -+ animalEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange ); -+ monsterEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange ); - - viewDistance = Bukkit.getServer().getViewDistance(); - viewDistance = configuration.getInt( "world-settings." + name + ".view-distance", viewDistance ); -@@ -161,6 +171,7 @@ public class CraftWorld implements World { - server.getLogger().info( "Exp Merge Radius: " + expMergeRadius ); - server.getLogger().info( "View distance: " + viewDistance ); - server.getLogger().info( "Orebfuscator: " + obfuscated ); -+ server.getLogger().info( "Entity Activation Range: An " + animalEntityActivationRange + " / Mo " + monsterEntityActivationRange + " / Mi " + miscEntityActivationRange ); - server.getLogger().info( "-------------------------------------------------" ); - } - // Spigot end -diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index e5004b3..2fc33f8 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -1,12 +1,43 @@ - package org.bukkit.craftbukkit; - - import java.net.InetAddress; ++ public static final CustomTimingsHandler entityActivationCheckTimer = new CustomTimingsHandler("entityActivationCheck"); ++ public static final CustomTimingsHandler checkIfActiveTimer = new CustomTimingsHandler("** checkIfActive"); ++ + public static final HashMap entityTypeTimingMap = new HashMap(); + public static final HashMap tileEntityTypeTimingMap = new HashMap(); + public static final HashMap pluginTaskTimingMap = new HashMap(); +diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java +new file mode 100644 +index 0000000..93ce20e +--- /dev/null ++++ b/src/main/java/org/spigotmc/ActivationRange.java +@@ -0,0 +1,296 @@ ++package org.spigotmc; ++ +import java.util.ArrayList; +import java.util.List; +import net.minecraft.server.AxisAlignedBB; @@ -238,33 +193,17 @@ index e5004b3..2fc33f8 100644 +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; - - 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); - private static boolean filterIps; - - public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { -@@ -24,12 +55,230 @@ 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!"); - } ++import org.bukkit.craftbukkit.CraftWorld; ++import org.bukkit.craftbukkit.SpigotTimings; + -+ } ++public class ActivationRange ++{ ++ ++ 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 ); + + /** + * Initializes an entities type on construction to specify what group this @@ -273,12 +212,16 @@ index e5004b3..2fc33f8 100644 + * @param entity + * @return group id + */ -+ public static byte initializeEntityActivationType(Entity entity) { -+ if (entity instanceof EntityMonster || entity instanceof EntitySlime) { ++ public static byte initializeEntityActivationType(Entity entity) ++ { ++ if ( entity instanceof EntityMonster || entity instanceof EntitySlime ) ++ { + return 1; // Monster -+ } else if (entity instanceof EntityCreature || entity instanceof EntityAmbient) { ++ } else if ( entity instanceof EntityCreature || entity instanceof EntityAmbient ) ++ { + return 2; // Animal -+ } else { ++ } else ++ { + return 3; // Misc + } + } @@ -290,10 +233,11 @@ index e5004b3..2fc33f8 100644 + * @param world + * @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) ++ public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config) ++ { ++ if ( ( entity.activationType == 3 && config.miscActivationRange == 0 ) ++ || ( entity.activationType == 2 && config.animalActivationRange == 0 ) ++ || ( entity.activationType == 1 && config.monsterActivationRange == 0 ) + || entity instanceof EntityHuman + || entity instanceof EntityProjectile + || entity instanceof EntityEnderDragon @@ -303,7 +247,8 @@ index e5004b3..2fc33f8 100644 + || entity instanceof EntityWeather + || entity instanceof EntityTNTPrimed + || entity instanceof EntityEnderCrystal -+ || entity instanceof EntityFireworks) { ++ || entity instanceof EntityFireworks ) ++ { + return true; + } + @@ -320,7 +265,8 @@ index e5004b3..2fc33f8 100644 + * @param y + * @param z + */ -+ public static void growBB(AxisAlignedBB target, AxisAlignedBB source, int x, int y, int z) { ++ public static void growBB(AxisAlignedBB target, AxisAlignedBB source, int x, int y, int z) ++ { + target.a = source.a - x; + target.b = source.b - y; + target.c = source.c - z; @@ -335,33 +281,38 @@ index e5004b3..2fc33f8 100644 + * + * @param world + */ -+ public static void activateEntities(World world) { ++ public static void activateEntities(World world) ++ { + SpigotTimings.entityActivationCheckTimer.startTiming(); -+ final int miscActivationRange = world.getWorld().miscEntityActivationRange; -+ final int animalActivationRange = world.getWorld().animalEntityActivationRange; -+ final int monsterActivationRange = world.getWorld().monsterEntityActivationRange; ++ final int miscActivationRange = world.spigotConfig.miscActivationRange; ++ final int animalActivationRange = world.spigotConfig.animalActivationRange; ++ final int monsterActivationRange = world.spigotConfig.monsterActivationRange; + -+ int maxRange = Math.max(monsterActivationRange, animalActivationRange); -+ maxRange = Math.max(maxRange, miscActivationRange); -+ maxRange = Math.min((world.getWorld().viewDistance << 4) - 8, maxRange); ++ int maxRange = Math.max( monsterActivationRange, animalActivationRange ); ++ maxRange = Math.max( maxRange, miscActivationRange ); ++ maxRange = Math.min( ( world.spigotConfig.viewDistance << 4 ) - 8, maxRange ); + -+ for (Entity player : new ArrayList(world.players)) { ++ for ( Entity player : new ArrayList( world.players ) ) ++ { + + player.activatedTick = MinecraftServer.currentTick; -+ growBB(maxBB, player.boundingBox, maxRange, 256, maxRange); -+ growBB(miscBB, player.boundingBox, miscActivationRange, 256, miscActivationRange); -+ growBB(animalBB, player.boundingBox, animalActivationRange, 256, animalActivationRange); -+ growBB(monsterBB, player.boundingBox, monsterActivationRange, 256, monsterActivationRange); ++ growBB( maxBB, player.boundingBox, maxRange, 256, maxRange ); ++ growBB( miscBB, player.boundingBox, miscActivationRange, 256, miscActivationRange ); ++ growBB( animalBB, player.boundingBox, animalActivationRange, 256, animalActivationRange ); ++ growBB( monsterBB, player.boundingBox, monsterActivationRange, 256, monsterActivationRange ); + -+ int i = MathHelper.floor(maxBB.a / 16.0D); -+ int j = MathHelper.floor(maxBB.d / 16.0D); -+ int k = MathHelper.floor(maxBB.c / 16.0D); -+ int l = MathHelper.floor(maxBB.f / 16.0D); ++ int i = MathHelper.floor( maxBB.a / 16.0D ); ++ int j = MathHelper.floor( maxBB.d / 16.0D ); ++ int k = MathHelper.floor( maxBB.c / 16.0D ); ++ int l = MathHelper.floor( maxBB.f / 16.0D ); + -+ for (int i1 = i; i1 <= j; ++i1) { -+ for (int j1 = k; j1 <= l; ++j1) { -+ if (world.getWorld().isChunkLoaded(i1, j1)) { -+ activateChunkEntities(world.getChunkAt(i1, j1)); ++ for ( int i1 = i; i1 <= j; ++i1 ) ++ { ++ for ( int j1 = k; j1 <= l; ++j1 ) ++ { ++ if ( world.getWorld().isChunkLoaded( i1, j1 ) ) ++ { ++ activateChunkEntities( world.getChunkAt( i1, j1 ) ); + } + } + } @@ -374,28 +325,37 @@ index e5004b3..2fc33f8 100644 + * + * @param chunk + */ -+ private static void activateChunkEntities(Chunk chunk) { -+ for (List slice : chunk.entitySlices) { -+ for (Entity entity : slice) { -+ if (MinecraftServer.currentTick > entity.activatedTick) { -+ if (entity.defaultActivationState) { ++ private static void activateChunkEntities(Chunk chunk) ++ { ++ for ( List slice : chunk.entitySlices ) ++ { ++ for ( Entity entity : slice ) ++ { ++ if ( MinecraftServer.currentTick > entity.activatedTick ) ++ { ++ if ( entity.defaultActivationState ) ++ { + entity.activatedTick = MinecraftServer.currentTick; + continue; + } -+ switch (entity.activationType) { ++ switch ( entity.activationType ) ++ { + case 1: -+ if (monsterBB.a(entity.boundingBox)) { ++ if ( monsterBB.a( entity.boundingBox ) ) ++ { + entity.activatedTick = MinecraftServer.currentTick; + } + break; + case 2: -+ if (animalBB.a(entity.boundingBox)) { ++ if ( animalBB.a( entity.boundingBox ) ) ++ { + entity.activatedTick = MinecraftServer.currentTick; + } + break; + case 3: + default: -+ if (miscBB.a(entity.boundingBox)) { ++ if ( miscBB.a( entity.boundingBox ) ) ++ { + entity.activatedTick = MinecraftServer.currentTick; + } + } @@ -411,37 +371,49 @@ index e5004b3..2fc33f8 100644 + * @param entity + * @return + */ -+ public static boolean checkEntityImmunities(Entity entity) { ++ public static boolean checkEntityImmunities(Entity entity) ++ { + // quick checks. -+ if (entity.inWater /* isInWater */ || entity.fireTicks > 0) { ++ if ( entity.inWater /* isInWater */ || entity.fireTicks > 0 ) ++ { + return true; + } -+ if (!(entity instanceof EntityArrow)) { -+ if (!entity.onGround || entity.passenger != null -+ || entity.vehicle != null) { ++ if ( !( entity instanceof EntityArrow ) ) ++ { ++ if ( !entity.onGround || entity.passenger != null ++ || entity.vehicle != null ) ++ { + return true; + } -+ } else if (!((EntityArrow) entity).inGround) { ++ } else if ( !( (EntityArrow) entity ).inGround ) ++ { + return true; + } + // special cases. -+ if (entity instanceof EntityLiving) { ++ if ( entity instanceof EntityLiving ) ++ { + EntityLiving living = (EntityLiving) entity; -+ if (living.attackTicks > 0 || living.hurtTicks > 0 || living.effects.size() > 0) { ++ if ( living.attackTicks > 0 || living.hurtTicks > 0 || living.effects.size() > 0 ) ++ { + return true; + } -+ if (entity instanceof EntityCreature && ((EntityCreature) entity).target != null) { ++ if ( entity instanceof EntityCreature && ( (EntityCreature) entity ).target != null ) ++ { + return true; + } -+ if (entity instanceof EntityVillager && ((EntityVillager) entity).n()) { ++ if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).n() ) ++ { + return true; + } -+ if (entity instanceof EntityAnimal) { ++ if ( entity instanceof EntityAnimal ) ++ { + EntityAnimal animal = (EntityAnimal) entity; -+ if (animal.isBaby() || animal.r() /*love*/) { ++ if ( animal.isBaby() || animal.r() /*love*/ ) ++ { + return true; + } -+ if (entity instanceof EntitySheep && ((EntitySheep) entity).isSheared()) { ++ if ( entity instanceof EntitySheep && ( (EntitySheep) entity ).isSheared() ) ++ { + return true; + } + } @@ -455,63 +427,60 @@ index e5004b3..2fc33f8 100644 + * @param entity + * @return + */ -+ public static boolean checkIfActive(Entity entity) { ++ public static boolean checkIfActive(Entity entity) ++ { + SpigotTimings.checkIfActiveTimer.startTiming(); + boolean isActive = entity.activatedTick >= MinecraftServer.currentTick || entity.defaultActivationState; + + // Should this entity tick? -+ if (!isActive) { -+ if ((MinecraftServer.currentTick - entity.activatedTick - 1) % 20 == 0) { ++ if ( !isActive ) ++ { ++ if ( ( MinecraftServer.currentTick - entity.activatedTick - 1 ) % 20 == 0 ) ++ { + // Check immunities every 20 ticks. -+ if (checkEntityImmunities(entity)) { ++ if ( checkEntityImmunities( entity ) ) ++ { + // Triggered some sort of immunity, give 20 full ticks before we check again. + entity.activatedTick = MinecraftServer.currentTick + 20; + } + isActive = true; + } + // Add a little performance juice to active entities. Skip 1/4 if not immune. -+ } else if (!entity.defaultActivationState && entity.ticksLived % 4 == 0 && !checkEntityImmunities(entity)) { ++ } else if ( !entity.defaultActivationState && entity.ticksLived % 4 == 0 && !checkEntityImmunities( entity ) ) ++ { + isActive = false; + } -+ int x = MathHelper.floor(entity.locX); -+ int z = MathHelper.floor(entity.locZ); ++ int x = MathHelper.floor( entity.locX ); ++ int z = MathHelper.floor( entity.locZ ); + // Make sure not on edge of unloaded chunk -+ if (isActive && !entity.world.areChunksLoaded(x, 0, z, 16)) { ++ if ( isActive && !entity.world.areChunksLoaded( x, 0, z, 16 ) ) ++ { + isActive = false; + } + SpigotTimings.checkIfActiveTimer.stopTiming(); + return isActive; ++ } ++} +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 2f514a0..2824b17 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -157,4 +157,15 @@ public class SpigotWorldConfig + + antiXrayInstance = new AntiXray( this ); } - - public static boolean filterIp(PendingConnection con) { -diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java -index f6e507e..4328ecf 100644 ---- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java -+++ b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java -@@ -29,6 +29,9 @@ public class SpigotTimings { - - public static final CustomTimingsHandler playerCommandTimer = new CustomTimingsHandler("** playerCommand"); - -+ public static final CustomTimingsHandler entityActivationCheckTimer = new CustomTimingsHandler("entityActivationCheck"); -+ public static final CustomTimingsHandler checkIfActiveTimer = new CustomTimingsHandler("** checkIfActive"); + - public static final HashMap entityTypeTimingMap = new HashMap(); - 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 7860ccc..9c64871 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -46,6 +46,9 @@ world-settings: - sugar-growth-modifier: 100 - tree-growth-modifier: 100 - mushroom-growth-modifier: 100 -+ entity-activation-range-animals: 32 -+ entity-activation-range-monsters: 32 -+ entity-activation-range-misc: 16 - info: true - world: - growth-chunks-per-tick: 1000 ++ public int animalActivationRange = 32; ++ public int monsterActivationRange = 32; ++ public int miscActivationRange = 16; ++ private void activationRange() ++ { ++ animalActivationRange = getInt( "entity-activation-range.animals", animalActivationRange ); ++ monsterActivationRange = getInt( "entity-activation-range.monsters", monsterActivationRange ); ++ miscActivationRange = getInt( "entity-activation-range.misc", miscActivationRange ); ++ log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Mi " + miscActivationRange ); ++ } + } -- 1.8.1.2 From 0503dd73fd275d9fad159f7b59c2ee9862e6810c Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 19:07:32 +1000 Subject: [PATCH 09/40] Metrics and watchdog --- CraftBukkit-Patches/0023-Metrics.patch | 85 ++--- .../0024-Watchdog-Thread.patch | 339 +++++++++--------- CraftBukkit-Patches/0025-Netty.patch | 14 +- 3 files changed, 200 insertions(+), 238 deletions(-) diff --git a/CraftBukkit-Patches/0023-Metrics.patch b/CraftBukkit-Patches/0023-Metrics.patch index 24556cd..f542621 100644 --- a/CraftBukkit-Patches/0023-Metrics.patch +++ b/CraftBukkit-Patches/0023-Metrics.patch @@ -1,61 +1,9 @@ -From 2ba22ed3cb7fcfbf52fd7bade08af98b4152e9cb Mon Sep 17 00:00:00 2001 +From 6d588b92bf8282f25ed30e7660a338f160a500bc Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 08:58:35 +1100 Subject: [PATCH] Metrics -diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index 2fc33f8..2532aa2 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -1,8 +1,10 @@ - package org.bukkit.craftbukkit; - -+import java.io.IOException; - import java.net.InetAddress; - import java.util.ArrayList; - import java.util.List; -+import java.util.logging.Level; - 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 { - -@@ -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")); -@@ -62,6 +68,16 @@ public class Spigot { - server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!"); - } - -+ tabPing = configuration.getBoolean("settings.tab-ping", tabPing); -+ -+ if (metrics == null) { -+ try { -+ metrics = new Metrics(); -+ metrics.start(); -+ } catch (IOException ex) { -+ Bukkit.getServer().getLogger().log(Level.SEVERE, "Could not start metrics service", ex); -+ } -+ } - } - - /** diff --git a/src/main/java/org/spigotmc/Metrics.java b/src/main/java/org/spigotmc/Metrics.java new file mode 100644 index 0000000..f1690a2 @@ -708,6 +656,37 @@ index 0000000..f1690a2 + } +} \ No newline at end of file +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index d647943..fde9250 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -29,6 +29,7 @@ public class SpigotConfig + static YamlConfiguration config; + static int version; + /*========================================================================*/ ++ private static Metrics metrics; + + public static void init() + { +@@ -38,6 +39,18 @@ public class SpigotConfig + + version = getInt( "config-version", 1 ); + readConfig( SpigotConfig.class, null ); ++ ++ if ( metrics == null ) ++ { ++ try ++ { ++ metrics = new Metrics(); ++ metrics.start(); ++ } catch ( IOException ex ) ++ { ++ Bukkit.getServer().getLogger().log( Level.SEVERE, "Could not start metrics service", ex ); ++ } ++ } + } + + static void readConfig(Class clazz, Object instance) -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0024-Watchdog-Thread.patch b/CraftBukkit-Patches/0024-Watchdog-Thread.patch index db79b92..99df003 100644 --- a/CraftBukkit-Patches/0024-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0024-Watchdog-Thread.patch @@ -1,4 +1,4 @@ -From 38b16a25eb92ac69f11bc50e958ad1eaf48471b7 Mon Sep 17 00:00:00 2001 +From c6b9aaf6ba62817a2cff96441552a2df4b91601a Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 12:33:20 +1100 Subject: [PATCH] Watchdog Thread. @@ -24,169 +24,149 @@ index db396b3..d197f06 100644 this.stop(); 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 2532aa2..6a164ca 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -1,5 +1,6 @@ - package org.bukkit.craftbukkit; - +diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java +new file mode 100644 +index 0000000..a5c4549 +--- /dev/null ++++ b/src/main/java/org/spigotmc/RestartCommand.java +@@ -0,0 +1,111 @@ ++package org.spigotmc; ++ +import java.io.File; - import java.io.IOException; - import java.net.InetAddress; - import java.util.ArrayList; -@@ -20,6 +21,7 @@ import net.minecraft.server.EntityFireworks; - import net.minecraft.server.EntityHuman; - import net.minecraft.server.EntityLiving; - import net.minecraft.server.EntityMonster; ++import java.util.List; +import net.minecraft.server.EntityPlayer; - import net.minecraft.server.EntityProjectile; - import net.minecraft.server.EntitySheep; - import net.minecraft.server.EntitySlime; -@@ -29,12 +31,15 @@ import net.minecraft.server.EntityWeather; - import net.minecraft.server.EntityWither; - import net.minecraft.server.MathHelper; - import net.minecraft.server.MinecraftServer; ++import net.minecraft.server.MinecraftServer; +import net.minecraft.server.Packet255KickDisconnect; - 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; -+import org.spigotmc.RestartCommand; -+import org.spigotmc.WatchdogThread; - - public class Spigot { - -@@ -48,6 +53,7 @@ public class Spigot { - - public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { - commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); -+ commandMap.register("restart", new RestartCommand("restart")); - - server.whitelistMessage = configuration.getString("settings.whitelist-message", server.whitelistMessage); - server.stopMessage = configuration.getString("settings.stop-message", server.stopMessage); -@@ -56,6 +62,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) { -+ case 0: -+ configuration.set("settings.timeout-time", 30); -+ case 1: -+ configuration.set("settings.timeout-time", 60); ++import org.bukkit.command.Command; ++import org.bukkit.command.CommandSender; ++ ++public class RestartCommand extends Command ++{ ++ ++ public RestartCommand(String name) ++ { ++ super( name ); ++ this.description = "Restarts the server"; ++ this.usageMessage = "/restart"; ++ this.setPermission( "bukkit.command.restart" ); ++ } ++ ++ @Override ++ public boolean execute(CommandSender sender, String currentAlias, String[] args) ++ { ++ if ( testPermission( sender ) ) ++ { ++ restart(); + } -+ configuration.set("config-version", 2); ++ return true; ++ } + -+ WatchdogThread.doStart(configuration.getInt("settings.timeout-time", 60), configuration.getBoolean("settings.restart-on-crash", false)); -+ - server.orebfuscatorEnabled = configuration.getBoolean("orebfuscator.enable", false); - server.orebfuscatorEngineMode = configuration.getInt("orebfuscator.engine-mode", 1); - server.orebfuscatorDisabledWorlds = configuration.getStringList("orebfuscator.disabled-worlds"); -@@ -297,6 +314,66 @@ public class Spigot { - return isActive; - } - -+ public static void restart() { -+ try { -+ String startupScript = MinecraftServer.getServer().server.configuration.getString("settings.restart-script-location", ""); -+ final File file = new File(startupScript); -+ if (file.isFile()) { -+ System.out.println("Attempting to restart with " + startupScript); ++ public static void restart() ++ { ++ try ++ { ++ final File file = new File( SpigotConfig.restartScript ); ++ if ( file.isFile() ) ++ { ++ System.out.println( "Attempting to restart with " + SpigotConfig.restartScript ); + + // Kick all players -+ for (EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players) { -+ p.playerConnection.networkManager.queue(new Packet255KickDisconnect("Server is restarting")); ++ for ( EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players ) ++ { ++ p.playerConnection.networkManager.queue( new Packet255KickDisconnect( "Server is restarting" ) ); + p.playerConnection.networkManager.d(); + } + // Give the socket a chance to send the packets -+ try { -+ Thread.sleep(100); -+ } catch (InterruptedException ex) { ++ try ++ { ++ Thread.sleep( 100 ); ++ } catch ( InterruptedException ex ) ++ { + } + // Close the socket so we can rebind with the new process + MinecraftServer.getServer().ae().a(); + + // Give time for it to kick in -+ try { -+ Thread.sleep(100); -+ } catch (InterruptedException ex) { ++ try ++ { ++ Thread.sleep( 100 ); ++ } catch ( InterruptedException ex ) ++ { + } + + // Actually shutdown -+ try { ++ try ++ { + MinecraftServer.getServer().stop(); -+ } catch (Throwable t) { ++ } catch ( Throwable t ) ++ { + } + + // This will be done AFTER the server has completely halted -+ Thread shutdownHook = new Thread() { ++ Thread shutdownHook = new Thread() ++ { + @Override -+ public void run() { -+ try { -+ String os = System.getProperty("os.name").toLowerCase(); -+ if (os.contains("win")) { -+ Runtime.getRuntime().exec("cmd /c start " + file.getPath()); -+ } else { -+ Runtime.getRuntime().exec(new String[]{"sh", file.getPath()}); ++ public void run() ++ { ++ try ++ { ++ String os = System.getProperty( "os.name" ).toLowerCase(); ++ if ( os.contains( "win" ) ) ++ { ++ Runtime.getRuntime().exec( "cmd /c start " + file.getPath() ); ++ } else ++ { ++ Runtime.getRuntime().exec( new String[] ++ { ++ "sh", file.getPath() ++ } ); + } -+ } catch (Exception e) { ++ } catch ( Exception e ) ++ { + e.printStackTrace(); + } + } + }; + -+ shutdownHook.setDaemon(true); -+ Runtime.getRuntime().addShutdownHook(shutdownHook); -+ } else { -+ System.out.println("Startup script '" + startupScript + "' does not exist! Stopping server."); ++ shutdownHook.setDaemon( true ); ++ Runtime.getRuntime().addShutdownHook( shutdownHook ); ++ } else ++ { ++ System.out.println( "Startup script '" + SpigotConfig.restartScript + "' does not exist! Stopping server." ); + } -+ System.exit(0); -+ } catch (Exception ex) { ++ System.exit( 0 ); ++ } catch ( Exception ex ) ++ { + ex.printStackTrace(); + } + } -+ - public static boolean 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 ---- /dev/null -+++ b/src/main/java/org/spigotmc/RestartCommand.java -@@ -0,0 +1,23 @@ -+package org.spigotmc; -+ -+import org.bukkit.command.Command; -+import org.bukkit.command.CommandSender; -+import org.bukkit.craftbukkit.Spigot; -+ -+public class RestartCommand extends Command { -+ -+ public RestartCommand(String name) { -+ super(name); -+ this.description = "Restarts the server"; -+ this.usageMessage = "/restart"; -+ this.setPermission("bukkit.command.restart"); -+ } -+ -+ @Override -+ public boolean execute(CommandSender sender, String currentAlias, String[] args) { -+ if (testPermission(sender)) { -+ Spigot.restart(); -+ } -+ return true; -+ } +} +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index fde9250..2fe3a5d 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -119,4 +119,15 @@ public class SpigotConfig + { + preventProxies = getBoolean( "settings.prevent-proxies", preventProxies ); + } ++ ++ public static int timeoutTime = 60; ++ public static boolean restartOnCrash = true; ++ public static String restartScript = "./start.sh"; ++ private static void watchdog() ++ { ++ timeoutTime = getInt( "settings.timeout-time", timeoutTime ); ++ restartOnCrash = getBoolean( "settings.restart-on-crash", restartOnCrash ); ++ restartScript = getString( "settings.restart-script", restartScript ); ++ WatchdogThread.doStart( timeoutTime, restartOnCrash ); ++ } + } diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java new file mode 100644 -index 0000000..10390b8 +index 0000000..38ef9b7 --- /dev/null +++ b/src/main/java/org/spigotmc/WatchdogThread.java -@@ -0,0 +1,93 @@ +@@ -0,0 +1,110 @@ +package org.spigotmc; + +import java.lang.management.ManagementFactory; @@ -195,9 +175,9 @@ index 0000000..10390b8 +import java.util.logging.Level; +import java.util.logging.Logger; +import org.bukkit.Bukkit; -+import org.bukkit.craftbukkit.Spigot; + -+public class WatchdogThread extends Thread { ++public class WatchdogThread extends Thread ++{ + + private static WatchdogThread instance; + private final long timeoutTime; @@ -205,95 +185,98 @@ index 0000000..10390b8 + private volatile long lastTick; + private volatile boolean stopping; + -+ private WatchdogThread(long timeoutTime, boolean restart) { -+ super("Spigot Watchdog Thread"); ++ private WatchdogThread(long timeoutTime, boolean restart) ++ { ++ super( "Spigot Watchdog Thread" ); + this.timeoutTime = timeoutTime; + this.restart = restart; + } + -+ public static void doStart(int timeoutTime, boolean restart) { -+ if (instance == null) { -+ instance = new WatchdogThread(timeoutTime * 1000L, restart); ++ public static void doStart(int timeoutTime, boolean restart) ++ { ++ if ( instance == null ) ++ { ++ instance = new WatchdogThread( timeoutTime * 1000L, restart ); + instance.start(); + } + } + -+ public static void tick() { ++ public static void tick() ++ { + instance.lastTick = System.currentTimeMillis(); + } + -+ public static void doStop() { -+ if (instance != null) { ++ public static void doStop() ++ { ++ if ( instance != null ) ++ { + instance.stopping = true; + } + } + + @Override -+ public void run() { -+ while (!stopping) { ++ public void run() ++ { ++ while ( !stopping ) ++ { + // -+ if (lastTick != 0 && System.currentTimeMillis() > lastTick + timeoutTime) { ++ if ( lastTick != 0 && System.currentTimeMillis() > lastTick + timeoutTime ) ++ { + Logger log = Bukkit.getServer().getLogger(); -+ log.log(Level.SEVERE, "The server has stopped responding!"); -+ log.log(Level.SEVERE, "Please report this to http://www.spigotmc.org/"); -+ log.log(Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports"); -+ log.log(Level.SEVERE, "Spigot version: " + Bukkit.getServer().getVersion()); ++ log.log( Level.SEVERE, "The server has stopped responding!" ); ++ log.log( Level.SEVERE, "Please report this to http://www.spigotmc.org/" ); ++ log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" ); ++ log.log( Level.SEVERE, "Spigot version: " + Bukkit.getServer().getVersion() ); + // -+ log.log(Level.SEVERE, "Current Thread State:"); -+ ThreadInfo[] threads = ManagementFactory.getThreadMXBean().dumpAllThreads(true, true); -+ for (ThreadInfo thread : threads) { -+ if (thread.getThreadState() != State.WAITING) { -+ log.log(Level.SEVERE, "------------------------------"); ++ log.log( Level.SEVERE, "Current Thread State:" ); ++ ThreadInfo[] threads = ManagementFactory.getThreadMXBean().dumpAllThreads( true, true ); ++ for ( ThreadInfo thread : threads ) ++ { ++ if ( thread.getThreadState() != State.WAITING ) ++ { ++ log.log( Level.SEVERE, "------------------------------" ); + // -+ log.log(Level.SEVERE, "Current Thread: " + thread.getThreadName()); -+ log.log(Level.SEVERE, "\tPID: " + thread.getThreadId() ++ log.log( Level.SEVERE, "Current Thread: " + thread.getThreadName() ); ++ log.log( Level.SEVERE, "\tPID: " + thread.getThreadId() + + " | Suspended: " + thread.isSuspended() + + " | Native: " + thread.isInNative() -+ + " | State: " + thread.getThreadState()); -+ if (thread.getLockedMonitors().length != 0) { -+ log.log(Level.SEVERE, "\tThread is waiting on monitor(s):"); -+ for (MonitorInfo monitor : thread.getLockedMonitors()) { -+ log.log(Level.SEVERE, "\t\tLocked on:" + monitor.getLockedStackFrame()); ++ + " | State: " + thread.getThreadState() ); ++ if ( thread.getLockedMonitors().length != 0 ) ++ { ++ log.log( Level.SEVERE, "\tThread is waiting on monitor(s):" ); ++ for ( MonitorInfo monitor : thread.getLockedMonitors() ) ++ { ++ log.log( Level.SEVERE, "\t\tLocked on:" + monitor.getLockedStackFrame() ); + } + } -+ log.log(Level.SEVERE, "\tStack:"); ++ log.log( Level.SEVERE, "\tStack:" ); + // + StackTraceElement[] stack = thread.getStackTrace(); -+ for (int line = 0; line < stack.length; line++) { -+ log.log(Level.SEVERE, "\t\t" + stack[line].toString()); ++ for ( int line = 0; line < stack.length; line++ ) ++ { ++ log.log( Level.SEVERE, "\t\t" + stack[line].toString() ); + } + } + } -+ log.log(Level.SEVERE, "------------------------------"); ++ log.log( Level.SEVERE, "------------------------------" ); + -+ if (restart) { -+ Spigot.restart(); ++ if ( restart ) ++ { ++ RestartCommand.restart(); + } + break; + } + -+ try { -+ sleep(10000); -+ } catch (InterruptedException ex) { ++ try ++ { ++ sleep( 10000 ); ++ } catch ( InterruptedException ex ) ++ { + interrupt(); + } + } + } +} -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 9c64871..3d4272b 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -31,6 +31,9 @@ settings: - spam-exclusions: - - /skill - filter-unsafe-ips: false -+ timeout-time: 30 -+ restart-on-crash: false -+ restart-script-location: /path/to/server/start.sh - world-settings: - default: - growth-chunks-per-tick: 650 -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index 075eda8..bd7000a 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,4 +1,4 @@ -From 5146e6a561c2858de9a0d2a44dadde9db0b7a8a6 Mon Sep 17 00:00:00 2001 +From 184b38aa96c6eb71116c452bff126cd7df9db814 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:47:32 +1000 Subject: [PATCH] Netty @@ -53,7 +53,7 @@ index 8c9f66b..a33020e 100644 diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 10ce69d..e4f1cbe 100644 +index 6668b7e..b2a4229 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -96,7 +96,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -131,7 +131,7 @@ index 1862863..5a24f2a 100644 + public void setSocketAddress(SocketAddress address) { k = address; } // Spigot } diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java -index 7711629..9cf625d 100644 +index efe102e..e488fa8 100644 --- a/src/main/java/net/minecraft/server/Packet51MapChunk.java +++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java @@ -42,7 +42,7 @@ public class Packet51MapChunk extends Packet { @@ -144,7 +144,7 @@ index 7711629..9cf625d 100644 this.d = chunkmap.c; this.c = chunkmap.b; diff --git a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java -index ce28495..fb34d4a 100644 +index a2cd9b0..f586415 100644 --- a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java +++ b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java @@ -24,7 +24,7 @@ public class Packet56MapChunkBulk extends Packet { @@ -210,10 +210,10 @@ index 17cfacc..a945892 100644 this.b = true; } catch (Exception exception) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 82dfef1..2485ef9 100644 +index 2567bde..7f5f3ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1389,4 +1389,20 @@ public final class CraftServer implements Server { +@@ -1367,4 +1367,20 @@ public final class CraftServer implements Server { public CraftScoreboardManager getScoreboardManager() { return scoreboardManager; } @@ -1500,7 +1500,7 @@ index 0000000..d3a9cab + DATA; +} diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 3d4272b..53db120 100644 +index 61a95e3..e65758d 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -13,6 +13,9 @@ From 715a18a7d98ecf060a1ab44e6d6aaf19f4d25d7a Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 19:23:30 +1000 Subject: [PATCH 10/40] Netty --- CraftBukkit-Patches/0025-Netty.patch | 185 ++++++++++++++++++--------- 1 file changed, 128 insertions(+), 57 deletions(-) diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index bd7000a..3170ecb 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,4 +1,4 @@ -From 184b38aa96c6eb71116c452bff126cd7df9db814 Mon Sep 17 00:00:00 2001 +From da93c0bd48b4e34c4561ba975e7561cf60be9ef0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:47:32 +1000 Subject: [PATCH] Netty @@ -236,14 +236,13 @@ index 2567bde..7f5f3ea 100644 } diff --git a/src/main/java/org/spigotmc/MultiplexingServerConnection.java b/src/main/java/org/spigotmc/MultiplexingServerConnection.java new file mode 100644 -index 0000000..c8ea80a +index 0000000..386c2f8 --- /dev/null +++ b/src/main/java/org/spigotmc/MultiplexingServerConnection.java -@@ -0,0 +1,126 @@ +@@ -0,0 +1,136 @@ +package org.spigotmc; + +import java.net.InetAddress; -+import java.net.InetSocketAddress; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; @@ -257,41 +256,38 @@ index 0000000..c8ea80a +import net.minecraft.server.ServerConnection; +import org.bukkit.Bukkit; + -+public class MultiplexingServerConnection extends ServerConnection { ++public class MultiplexingServerConnection extends ServerConnection ++{ + -+ private static final boolean NETTY_DISABLED = Boolean.getBoolean("org.spigotmc.netty.disabled"); + private final Collection children = new HashSet(); -+ private final List pending = Collections.synchronizedList(new ArrayList()); ++ private final List pending = Collections.synchronizedList( new ArrayList() ); + private final HashMap throttle = new HashMap(); + -+ public MultiplexingServerConnection(MinecraftServer ms) { -+ super(ms); ++ public MultiplexingServerConnection(MinecraftServer ms) ++ { ++ super( ms ); + -+ // Add primary connection -+ start(ms.server.getIp(), ms.server.getPort()); -+ // Add all other connections -+ for (InetSocketAddress address : ms.server.getSecondaryHosts()) { -+ start(address.getAddress().getHostAddress(), address.getPort()); -+ } -+ } -+ -+ private void start(String ipAddress, int port) { -+ try { -+ // Calculate address, can't use isEmpty due to Java 5 -+ InetAddress socketAddress = (ipAddress.length() == 0) ? null : InetAddress.getByName(ipAddress); -+ // Say hello to the log -+ d().getLogger().info("Starting listener #" + children.size() + " on " + (socketAddress == null ? "*" : ipAddress) + ":" + port); -+ // Start connection: Netty / non Netty -+ ServerConnection listener = (NETTY_DISABLED) ? new DedicatedServerConnection(d(), socketAddress, port) : new org.spigotmc.netty.NettyServerConnection(d(), socketAddress, port); -+ // Register with other connections -+ children.add(listener); -+ // Gotta catch em all -+ } catch (Throwable t) { -+ // Just print some info to the log -+ t.printStackTrace(); -+ d().getLogger().warning("**** FAILED TO BIND TO PORT!"); -+ d().getLogger().warning("The exception was: {0}", t); -+ d().getLogger().warning("Perhaps a server is already running on that port?"); ++ for ( SpigotConfig.Listener listener : SpigotConfig.listeners ) ++ { ++ try ++ { ++ // Calculate address, can't use isEmpty due to Java 5 ++ InetAddress socketAddress = ( listener.host.length() == 0 ) ? null : InetAddress.getByName( listener.host ); ++ // Say hello to the log ++ d().getLogger().info( "Starting listener #" + children.size() + " on " + ( socketAddress == null ? "*" : listener.host ) + ":" + listener.port ); ++ // Start connection: Netty / non Netty ++ ServerConnection l = ( listener.netty ) ? new DedicatedServerConnection( d(), socketAddress, listener.port ) : new org.spigotmc.netty.NettyServerConnection( d(), socketAddress, listener.port ); ++ // Register with other connections ++ children.add( l ); ++ // Gotta catch em all ++ } catch ( Throwable t ) ++ { ++ // Just print some info to the log ++ t.printStackTrace(); ++ d().getLogger().warning( "**** FAILED TO BIND TO PORT!" ); ++ d().getLogger().warning( "The exception was: {0}", t ); ++ d().getLogger().warning( "Perhaps a server is already running on that port?" ); ++ } + } + } + @@ -299,8 +295,10 @@ index 0000000..c8ea80a + * close. + */ + @Override -+ public void a() { -+ for (ServerConnection child : children) { ++ public void a() ++ { ++ for ( ServerConnection child : children ) ++ { + child.a(); + } + } @@ -310,20 +308,25 @@ index 0000000..c8ea80a + * called from the main server thread a few times a tick. + */ + @Override -+ public void b() { ++ public void b() ++ { + super.b(); // pulse PlayerConnections -+ for (int i = 0; i < pending.size(); ++i) { -+ PendingConnection connection = pending.get(i); ++ for ( int i = 0; i < pending.size(); ++i ) ++ { ++ PendingConnection connection = pending.get( i ); + -+ try { ++ try ++ { + connection.c(); -+ } catch (Exception ex) { -+ connection.disconnect("Internal server error"); -+ Bukkit.getServer().getLogger().log(Level.WARNING, "Failed to handle packet: " + ex, ex); ++ } catch ( Exception ex ) ++ { ++ connection.disconnect( "Internal server error" ); ++ Bukkit.getServer().getLogger().log( Level.WARNING, "Failed to handle packet: " + ex, ex ); + } + -+ if (connection.b) { -+ pending.remove(i--); ++ if ( connection.b ) ++ { ++ pending.remove( i-- ); + } + } + } @@ -334,10 +337,13 @@ index 0000000..c8ea80a + * + * @param address the address to remove + */ -+ public void unThrottle(InetAddress address) { -+ if (address != null) { -+ synchronized (throttle) { -+ throttle.remove(address); ++ public void unThrottle(InetAddress address) ++ { ++ if ( address != null ) ++ { ++ synchronized ( throttle ) ++ { ++ throttle.remove( address ); + } + } + } @@ -348,24 +354,89 @@ index 0000000..c8ea80a + * @param address + * @return Whether they must be disconnected + */ -+ public boolean throttle(InetAddress address) { ++ public boolean throttle(InetAddress address) ++ { + long currentTime = System.currentTimeMillis(); -+ synchronized (throttle) { -+ Long value = throttle.get(address); -+ if (value != null && !address.isLoopbackAddress() && currentTime - value < d().server.getConnectionThrottle()) { -+ throttle.put(address, currentTime); ++ synchronized ( throttle ) ++ { ++ Long value = throttle.get( address ); ++ if ( value != null && !address.isLoopbackAddress() && currentTime - value < d().server.getConnectionThrottle() ) ++ { ++ throttle.put( address, currentTime ); + return true; + } + -+ throttle.put(address, currentTime); ++ throttle.put( address, currentTime ); + } + return false; + } + -+ public void register(PendingConnection conn) { -+ pending.add(conn); ++ public void register(PendingConnection conn) ++ { ++ pending.add( conn ); + } +} +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index 2fe3a5d..90d3193 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -6,6 +6,11 @@ import java.io.IOException; + import java.lang.reflect.InvocationTargetException; + import java.lang.reflect.Method; + import java.lang.reflect.Modifier; ++import java.util.ArrayList; ++import java.util.Collections; ++import java.util.HashMap; ++import java.util.List; ++import java.util.Map; + import java.util.logging.Level; + import org.bukkit.Bukkit; + import org.bukkit.configuration.file.YamlConfiguration; +@@ -130,4 +135,44 @@ public class SpigotConfig + restartScript = getString( "settings.restart-script", restartScript ); + WatchdogThread.doStart( timeoutTime, restartOnCrash ); + } ++ ++ public static class Listener ++ { ++ ++ public String host; ++ public int port; ++ public boolean netty; ++ public long connectionThrottle; ++ ++ public Listener(String host, int port, boolean netty, long connectionThrottle) ++ { ++ this.host = host; ++ this.port = port; ++ this.netty = netty; ++ this.connectionThrottle = connectionThrottle; ++ } ++ } ++ public static List listeners = new ArrayList(); ++ private void listeners() ++ { ++ Map def = new HashMap(); ++ def.put( "host", "default" ); ++ def.put( "port", "default" ); ++ def.put( "netty", true ); ++ def.put( "throttle", "default" ); ++ ++ config.addDefault( "listeners", Collections.singletonList( def ) ); ++ for ( Map info : (List>) config.getList( "listeners" ) ) ++ { ++ String host = (String) info.get( "host" ); ++ if ( "default".equals( host ) ) ++ { ++ host = Bukkit.getIp(); ++ } ++ int port = ( info.get( "port" ) instanceof Integer ) ? (Integer) info.get( "port" ) : Bukkit.getPort(); ++ boolean netty = (Boolean) info.get( "netty" ); ++ long connectionThrottle = ( info.get( "throttle" ) instanceof Number ) ? ( (Number) info.get( "throttle" ) ).longValue() : Bukkit.getConnectionThrottle(); ++ this.listeners.add( new Listener( host, port, netty, connectionThrottle ) ); ++ } ++ } + } diff --git a/src/main/java/org/spigotmc/netty/CipherBase.java b/src/main/java/org/spigotmc/netty/CipherBase.java new file mode 100644 index 0000000..c75a60f From 4e5ba04a5bfd8985642023d31572382b22c8f9f0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 19:37:15 +1000 Subject: [PATCH 11/40] Bungee --- .../0033-Entity-Tracking-Ranges.patch | 170 +++++++----------- .../0034-BungeeCord-Support.patch | 70 ++++---- 2 files changed, 92 insertions(+), 148 deletions(-) diff --git a/CraftBukkit-Patches/0033-Entity-Tracking-Ranges.patch b/CraftBukkit-Patches/0033-Entity-Tracking-Ranges.patch index 3139754..2444b63 100644 --- a/CraftBukkit-Patches/0033-Entity-Tracking-Ranges.patch +++ b/CraftBukkit-Patches/0033-Entity-Tracking-Ranges.patch @@ -1,4 +1,4 @@ -From be31d26856f8eec9b73d506af26ae2de32a87c85 Mon Sep 17 00:00:00 2001 +From 1ee15ef0c0ce6a8016991314892246011fded197 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Feb 2013 11:58:47 -0500 Subject: [PATCH] Entity Tracking Ranges @@ -12,142 +12,92 @@ This has multiple benefits: 4) Less client lag - Not trying to render distant item frames and paintings and entities will reduce entity count on the client, which is major for shop/town worlds which may use tons of item frames. diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index d7efe3e..f6f1ab0 100644 +index d7efe3e..59586c2 100644 --- a/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java @@ -90,6 +90,7 @@ public class EntityTracker { public void addEntity(Entity entity, int i, int j, boolean flag) { if (Thread.currentThread() != MinecraftServer.getServer().primaryThread) throw new IllegalStateException("Asynchronous entity track!"); // Spigot -+ i = org.bukkit.craftbukkit.Spigot.getEntityTrackingRange(entity, i); // Spigot ++ i = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, i); // Spigot if (i > this.d) { i = this.d; } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ebf1a67..4439ebc 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -89,6 +89,12 @@ public class CraftWorld implements World { - public int miscEntityActivationRange = 16; - public int animalEntityActivationRange = 32; - public int monsterEntityActivationRange = 32; -+ // Tracking Ranges: -+ public int playerTrackingRange = 64; -+ public int miscTrackingRange = 32; +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 2824b17..86d6939 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -168,4 +168,19 @@ public class SpigotWorldConfig + miscActivationRange = getInt( "entity-activation-range.misc", miscActivationRange ); + log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Mi " + miscActivationRange ); + } ++ ++ public int playerTrackingRange = 48; + public int animalTrackingRange = 48; + public int monsterTrackingRange = 48; ++ public int miscTrackingRange = 32; + public int maxTrackingRange = 64; - // Spigot end - - // Spigot start -@@ -128,6 +134,11 @@ public class CraftWorld implements World { - miscEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-misc" ); - animalEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-animals" ); - monsterEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-monsters" ); -+ playerTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-players" ); -+ miscTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-misc" ); -+ animalTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-animals" ); -+ monsterTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-monsters" ); -+ maxTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-max" ); - - // Override defaults with world specific, if they exist - info = configuration.getBoolean( "world-settings." + name + ".info", info ); -@@ -147,10 +158,19 @@ public class CraftWorld implements World { - miscEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-misc", miscEntityActivationRange ); - animalEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange ); - monsterEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange ); -+ maxTrackingRange = configuration.getInt( "world-settings." + name + ".entity-tracking-range-max", maxTrackingRange ); -+ playerTrackingRange = Math.min( maxTrackingRange, configuration.getInt( "world-settings." + name + ".entity-tracking-range-players", playerTrackingRange ) ); -+ miscTrackingRange = Math.min( maxTrackingRange, configuration.getInt( "world-settings." + name + ".entity-tracking-range-misc", miscTrackingRange ) ); -+ animalTrackingRange = Math.min( maxTrackingRange, configuration.getInt( "world-settings." + name + ".entity-tracking-range-animals", animalTrackingRange ) ); -+ monsterTrackingRange = Math.min( maxTrackingRange, configuration.getInt( "world-settings." + name + ".entity-tracking-range-monsters", monsterTrackingRange ) ); - - viewDistance = Bukkit.getServer().getViewDistance(); - viewDistance = configuration.getInt( "world-settings." + name + ".view-distance", viewDistance ); - obfuscated = world.getServer().orebfuscatorEnabled && !world.getServer().orebfuscatorDisabledWorlds.contains( name ); -+ if ( maxTrackingRange == 0 ) -+ { -+ System.err.println( "Error! Should not have 0 maxRange" ); -+ } - - if ( info ) - { -@@ -172,6 +192,7 @@ public class CraftWorld implements World { - server.getLogger().info( "View distance: " + viewDistance ); - server.getLogger().info( "Orebfuscator: " + obfuscated ); - server.getLogger().info( "Entity Activation Range: An " + animalEntityActivationRange + " / Mo " + monsterEntityActivationRange + " / Mi " + miscEntityActivationRange ); -+ server.getLogger().info( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Max " + maxTrackingRange ); - server.getLogger().info( "-------------------------------------------------" ); - } - // Spigot end -diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index 6a164ca..c434f14 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -16,11 +16,16 @@ import net.minecraft.server.EntityComplexPart; - import net.minecraft.server.EntityCreature; - import net.minecraft.server.EntityEnderCrystal; - import net.minecraft.server.EntityEnderDragon; ++ private void trackingRange() ++ { ++ playerTrackingRange = getInt( "entity-tracking-range.players", playerTrackingRange ); ++ animalTrackingRange = getInt( "entity-tracking-range.animals", animalTrackingRange ); ++ monsterTrackingRange = getInt( "entity-tracking-range.monsters", monsterTrackingRange ); ++ miscTrackingRange = getInt( "entity-tracking-range.misc", miscTrackingRange ); ++ maxTrackingRange = getInt( "entity-tracking-range.other", maxTrackingRange ); ++ log( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Other " + maxTrackingRange ); ++ } + } +diff --git a/src/main/java/org/spigotmc/TrackingRange.java b/src/main/java/org/spigotmc/TrackingRange.java +new file mode 100644 +index 0000000..bc6438d +--- /dev/null ++++ b/src/main/java/org/spigotmc/TrackingRange.java +@@ -0,0 +1,45 @@ ++package org.spigotmc; ++ ++import net.minecraft.server.Entity; +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; -@@ -374,6 +379,30 @@ public class Spigot { - } - } - ++import net.minecraft.server.EntityPlayer; ++ ++public class TrackingRange ++{ ++ + /** -+ * 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 + */ -+ public static int getEntityTrackingRange(Entity entity, int defaultRange) { -+ CraftWorld world = entity.world.getWorld(); ++ public static int getEntityTrackingRange(Entity entity, int defaultRange) ++ { ++ SpigotWorldConfig config = entity.world.spigotConfig; + int range = defaultRange; -+ if (entity instanceof EntityPlayer) { -+ range = world.playerTrackingRange; -+ } else if (entity.defaultActivationState || entity instanceof EntityGhast) { ++ if ( entity instanceof EntityPlayer ) ++ { ++ range = config.playerTrackingRange; ++ } else if ( entity.defaultActivationState || entity instanceof EntityGhast ) ++ { + range = defaultRange; -+ } else if (entity.activationType == 1) { -+ range = world.monsterTrackingRange; -+ } else if (entity.activationType == 2) { -+ range = world.animalTrackingRange; -+ } else if (entity instanceof EntityItemFrame || entity instanceof EntityPainting || entity instanceof EntityItem || entity instanceof EntityExperienceOrb) { -+ range = world.miscTrackingRange; ++ } else if ( entity.activationType == 1 ) ++ { ++ range = config.monsterTrackingRange; ++ } else if ( entity.activationType == 2 ) ++ { ++ range = config.animalTrackingRange; ++ } else if ( entity instanceof EntityItemFrame || entity instanceof EntityPainting || entity instanceof EntityItem || entity instanceof EntityExperienceOrb ) ++ { ++ range = config.miscTrackingRange; + } + -+ return Math.min(world.maxTrackingRange, range); ++ return Math.min( config.maxTrackingRange, range ); + } -+ - public static boolean filterIp(PendingConnection con) { - if (filterIps) { - try { -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 53db120..28d13fb 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -55,6 +55,11 @@ world-settings: - entity-activation-range-animals: 32 - entity-activation-range-monsters: 32 - entity-activation-range-misc: 16 -+ entity-tracking-range-players: 48 -+ entity-tracking-range-animals: 48 -+ entity-tracking-range-monsters: 48 -+ entity-tracking-range-misc: 32 -+ entity-tracking-range-max: 64 - info: true - world: - growth-chunks-per-tick: 1000 ++} -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0034-BungeeCord-Support.patch b/CraftBukkit-Patches/0034-BungeeCord-Support.patch index 3d8cbea..46c53b0 100644 --- a/CraftBukkit-Patches/0034-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0034-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From c3be564e248a414047f94a896f9ee545f47805df Mon Sep 17 00:00:00 2001 +From 994bb48cde58d9f7888008c5cc2585b7b5d12cb1 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 a945892..7ef9a6f 100644 +index a945892..e78781e 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 { @@ -17,7 +17,7 @@ index a945892..7ef9a6f 100644 + // Spigot start + @Override + public void a(Packet250CustomPayload pcp) { -+ if (pcp.tag.equals("BungeeCord") && org.bukkit.craftbukkit.Spigot.bungeeIPs.contains(getSocket().getInetAddress().getHostAddress())) { ++ if (pcp.tag.equals("BungeeCord") && org.spigotmc.SpigotConfig.bungee && org.spigotmc.SpigotConfig.bungeeAddresses.contains(getSocket().getInetAddress().getHostAddress())) { + com.google.common.io.ByteArrayDataInput in = com.google.common.io.ByteStreams.newDataInput(pcp.data); + String subTag = in.readUTF(); + if (subTag.equals("Login")) { @@ -28,7 +28,7 @@ index a945892..7ef9a6f 100644 + // Spigot end } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 305855b..e6e9295 100644 +index f748492..e9b4c18 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -293,7 +293,7 @@ public abstract class PlayerList { @@ -41,7 +41,7 @@ index 305855b..e6e9295 100644 SocketAddress socketaddress = pendingconnection.networkManager.getSocketAddress(); diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java -index fcd4136..fb4ec7b 100644 +index 1254e63..a4eae65 100644 --- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java +++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java @@ -45,11 +45,11 @@ class ThreadLoginVerifier extends Thread { @@ -58,26 +58,6 @@ index fcd4136..fb4ec7b 100644 if (asyncEvent.getResult() != PlayerPreLoginEvent.Result.ALLOWED) { event.disallow(asyncEvent.getResult(), asyncEvent.getKickMessage()); } -diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index c434f14..dd92087 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -55,6 +55,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")); -@@ -91,6 +92,7 @@ public class Spigot { - } - - tabPing = configuration.getBoolean("settings.tab-ping", tabPing); -+ bungeeIPs = configuration.getStringList("settings.bungee-proxies"); - - if (metrics == null) { - try { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 8ec84e1..d70c110 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -94,19 +74,33 @@ index 8ec84e1..d70c110 100644 }; public Spigot spigot() -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 28d13fb..2e3b242 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -37,6 +37,8 @@ settings: - timeout-time: 30 - restart-on-crash: false - restart-script-location: /path/to/server/start.sh -+ bungee-proxies: -+ - 127.0.0.1 - world-settings: - default: - growth-chunks-per-tick: 650 +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index 90d3193..4a80929 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -7,6 +7,7 @@ import java.lang.reflect.InvocationTargetException; + import java.lang.reflect.Method; + import java.lang.reflect.Modifier; + import java.util.ArrayList; ++import java.util.Arrays; + import java.util.Collections; + import java.util.HashMap; + import java.util.List; +@@ -175,4 +176,14 @@ public class SpigotConfig + this.listeners.add( new Listener( host, port, netty, connectionThrottle ) ); + } + } ++ public static List bungeeAddresses = Arrays.asList( new String[] ++ { ++ "127.0.0.1" ++ } ); ++ public static boolean bungee = true; ++ private void bungee() ++ { ++ bungeeAddresses = getList( "settings.bungeecord-addresses", bungee ); ++ bungee = getBoolean( "settings.bungeecord", true ); ++ } + } -- 1.8.1.2 From 8def0484463988ebdec4bf95cbf6f85cb0a79ae1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 19:44:06 +1000 Subject: [PATCH 12/40] Round 1 of Spigot.yml / Spigot Rewrite / Spigot Cleanup is complete! --- ... => 0035-Limit-Custom-Map-Rendering.patch} | 2 +- .../0035-Texture-Pack-Resolutions.patch | 68 ------------ ...ption-for-disabled-plugin-tasks.-Fi.patch} | 2 +- ...> 0037-Enable-Improved-ping-sending.patch} | 16 +-- ...nt-handshake-spam-from-invalid-names.patch | 27 +++++ ...nt-handshake-spam-from-invalid-names.patch | 60 ---------- ...s-for-randomly-spawned-creatures-to.patch} | 2 +- ...ch => 0040-Thread-Naming-and-Tweaks.patch} | 6 +- ...1-Close-Unloaded-World-s-Save-Files.patch} | 6 +- ...Optimized-version-of-LocaleLanguage.patch} | 2 +- ...-list-performance-on-chunk-unloads-.patch} | 24 ++-- ...ption.patch => 0044-Remove-o-Option.patch} | 2 +- ...patch => 0045-Recipe-Deconstruction.patch} | 2 +- ...ng.patch => 0046-Fix-Health-Scaling.patch} | 2 +- ...-EntityShootBowEvent-with-Skeletons.patch} | 2 +- ...I.patch => 0048-Implement-Arrow-API.patch} | 2 +- ...icle-API.patch => 0049-Particle-API.patch} | 12 +- .../0050-Hopper-Cooldowns.patch | 86 +++++++++++++++ .../0051-Hopper-Cooldowns.patch | 103 ------------------ ...patch => 0051-Prevent-Shutdown-Hang.patch} | 4 +- ...=> 0052-Implement-SpawnerSpawnEvent.patch} | 2 +- ...tch => 0053-Firework-Meta-Crash-Fix.patch} | 2 +- ...4-Do-Not-Search-for-Offline-Players.patch} | 6 +- 23 files changed, 155 insertions(+), 285 deletions(-) rename CraftBukkit-Patches/{0036-Limit-Custom-Map-Rendering.patch => 0035-Limit-Custom-Map-Rendering.patch} (98%) delete mode 100644 CraftBukkit-Patches/0035-Texture-Pack-Resolutions.patch rename CraftBukkit-Patches/{0037-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch => 0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch} (95%) rename CraftBukkit-Patches/{0038-Enable-Improved-ping-sending.patch => 0037-Enable-Improved-ping-sending.patch} (79%) create mode 100644 CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch delete mode 100644 CraftBukkit-Patches/0039-Prevent-handshake-spam-from-invalid-names.patch rename CraftBukkit-Patches/{0040-Save-entity-counts-for-randomly-spawned-creatures-to.patch => 0039-Save-entity-counts-for-randomly-spawned-creatures-to.patch} (97%) rename CraftBukkit-Patches/{0041-Thread-Naming-and-Tweaks.patch => 0040-Thread-Naming-and-Tweaks.patch} (96%) rename CraftBukkit-Patches/{0042-Close-Unloaded-World-s-Save-Files.patch => 0041-Close-Unloaded-World-s-Save-Files.patch} (94%) rename CraftBukkit-Patches/{0043-Optimized-version-of-LocaleLanguage.patch => 0042-Optimized-version-of-LocaleLanguage.patch} (98%) rename CraftBukkit-Patches/{0044-Improve-next-tick-list-performance-on-chunk-unloads-.patch => 0043-Improve-next-tick-list-performance-on-chunk-unloads-.patch} (94%) rename CraftBukkit-Patches/{0045-Remove-o-Option.patch => 0044-Remove-o-Option.patch} (92%) rename CraftBukkit-Patches/{0046-Recipe-Deconstruction.patch => 0045-Recipe-Deconstruction.patch} (97%) rename CraftBukkit-Patches/{0047-Fix-Health-Scaling.patch => 0046-Fix-Health-Scaling.patch} (97%) rename CraftBukkit-Patches/{0048-Fix-EntityShootBowEvent-with-Skeletons.patch => 0047-Fix-EntityShootBowEvent-with-Skeletons.patch} (95%) rename CraftBukkit-Patches/{0049-Implement-Arrow-API.patch => 0048-Implement-Arrow-API.patch} (93%) rename CraftBukkit-Patches/{0050-Particle-API.patch => 0049-Particle-API.patch} (97%) create mode 100644 CraftBukkit-Patches/0050-Hopper-Cooldowns.patch delete mode 100644 CraftBukkit-Patches/0051-Hopper-Cooldowns.patch rename CraftBukkit-Patches/{0052-Prevent-Shutdown-Hang.patch => 0051-Prevent-Shutdown-Hang.patch} (92%) rename CraftBukkit-Patches/{0053-Implement-SpawnerSpawnEvent.patch => 0052-Implement-SpawnerSpawnEvent.patch} (98%) rename CraftBukkit-Patches/{0054-Firework-Meta-Crash-Fix.patch => 0053-Firework-Meta-Crash-Fix.patch} (94%) rename CraftBukkit-Patches/{0055-Do-Not-Search-for-Offline-Players.patch => 0054-Do-Not-Search-for-Offline-Players.patch} (82%) diff --git a/CraftBukkit-Patches/0036-Limit-Custom-Map-Rendering.patch b/CraftBukkit-Patches/0035-Limit-Custom-Map-Rendering.patch similarity index 98% rename from CraftBukkit-Patches/0036-Limit-Custom-Map-Rendering.patch rename to CraftBukkit-Patches/0035-Limit-Custom-Map-Rendering.patch index a8507dd..52ee736 100644 --- a/CraftBukkit-Patches/0036-Limit-Custom-Map-Rendering.patch +++ b/CraftBukkit-Patches/0035-Limit-Custom-Map-Rendering.patch @@ -1,4 +1,4 @@ -From cdea9e85e90d8ad08e7391db9ef20b362a0d3965 Mon Sep 17 00:00:00 2001 +From 9b13c53b9a7779891bd61377204d8d743c890839 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-Texture-Pack-Resolutions.patch b/CraftBukkit-Patches/0035-Texture-Pack-Resolutions.patch deleted file mode 100644 index 460f304..0000000 --- a/CraftBukkit-Patches/0035-Texture-Pack-Resolutions.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 169434d1db9c1d520028cbe61fb5a386db115c72 Mon Sep 17 00:00:00 2001 -From: md_5 -Date: Sat, 23 Mar 2013 13:04:45 +1100 -Subject: [PATCH] Texture Pack Resolutions - -Fix issues when specifiying a server texture pack URL with resolution != 16. - -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d197f06..e348ac5 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1076,7 +1076,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo - } - - public int S() { -- return 16; -+ return org.bukkit.craftbukkit.Spigot.textureResolution; // Spigot - } - - 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 dd92087..99020e7 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -56,6 +56,7 @@ public class Spigot { - public static boolean tabPing = false; - private static Metrics metrics; - public static List bungeeIPs; -+ public static int textureResolution = 16; - - public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { - commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); -@@ -93,6 +94,7 @@ public class Spigot { - - tabPing = configuration.getBoolean("settings.tab-ping", tabPing); - bungeeIPs = configuration.getStringList("settings.bungee-proxies"); -+ textureResolution = configuration.getInt("settings.texture-resolution", textureResolution); - - if (metrics == null) { - try { -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d70c110..3d39d07 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -830,7 +830,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - public void setTexturePack(String url) { - Validate.notNull(url, "Texture pack URL cannot be null"); - -- byte[] message = (url + "\0" + "16").getBytes(); -+ byte[] message = (url + "\0" + org.bukkit.craftbukkit.Spigot.textureResolution).getBytes(); // Spigot - Validate.isTrue(message.length <= Messenger.MAX_MESSAGE_SIZE, "Texture pack URL is too long"); - - 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 2e3b242..4334b20 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -39,6 +39,7 @@ settings: - restart-script-location: /path/to/server/start.sh - bungee-proxies: - - 127.0.0.1 -+ texture-resolution: 16 - world-settings: - default: - growth-chunks-per-tick: 650 --- -1.8.1.2 - diff --git a/CraftBukkit-Patches/0037-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/0037-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch rename to CraftBukkit-Patches/0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch index 6dce323..8837563 100644 --- a/CraftBukkit-Patches/0037-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 bc47d2f19f661d565fa5a5836ae12611ca919b41 Mon Sep 17 00:00:00 2001 +From 46f2ad93239b4f6c92b8187f4e6b54c6d19e9aa3 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/0038-Enable-Improved-ping-sending.patch b/CraftBukkit-Patches/0037-Enable-Improved-ping-sending.patch similarity index 79% rename from CraftBukkit-Patches/0038-Enable-Improved-ping-sending.patch rename to CraftBukkit-Patches/0037-Enable-Improved-ping-sending.patch index b23c9df..97aa68d 100644 --- a/CraftBukkit-Patches/0038-Enable-Improved-ping-sending.patch +++ b/CraftBukkit-Patches/0037-Enable-Improved-ping-sending.patch @@ -1,4 +1,4 @@ -From ce0a432bfc7a8c6d84276172bb03c4641a4fdf1f Mon Sep 17 00:00:00 2001 +From 40640764e8461fdc97f93fad90d081b1ef8975f1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Feb 2013 20:45:20 +1100 Subject: [PATCH] Enable Improved ping sending @@ -20,7 +20,7 @@ index 9925d1b..5fa0b05 100644 public EntityPlayer(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager playerinteractmanager) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e6e9295..d5387f3 100644 +index e9b4c18..c61e959 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -724,7 +724,23 @@ public abstract class PlayerList { @@ -47,18 +47,6 @@ index e6e9295..d5387f3 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 4334b20..5d2ef1f 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -34,6 +34,7 @@ settings: - spam-exclusions: - - /skill - filter-unsafe-ips: false -+ tab-ping: false - timeout-time: 30 - restart-on-crash: false - restart-script-location: /path/to/server/start.sh -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch b/CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch new file mode 100644 index 0000000..d3bedc4 --- /dev/null +++ b/CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch @@ -0,0 +1,27 @@ +From ae91a14ab631e23dfaa70e8e5db25ce04e633421 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..26de0b5 100644 +--- a/src/main/java/net/minecraft/server/Packet2Handshake.java ++++ b/src/main/java/net/minecraft/server/Packet2Handshake.java +@@ -14,11 +14,13 @@ public class Packet2Handshake extends Packet { + + public Packet2Handshake() {} + ++ public static final java.util.regex.Pattern validName = java.util.regex.Pattern.compile("^[a-zA-Z0-9_-]{2,16}$"); + public void a(DataInputStream datainputstream) throws IOException { // CraftBukkit - throws IOException + this.a = datainputstream.readByte(); + this.b = a(datainputstream, 16); + this.c = a(datainputstream, 255); + this.d = datainputstream.readInt(); ++ if(!validName.matcher(this.b).matches()) throw new IOException("Invalid name!"); // Spigot + } + + public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException +-- +1.8.1.2 + diff --git a/CraftBukkit-Patches/0039-Prevent-handshake-spam-from-invalid-names.patch b/CraftBukkit-Patches/0039-Prevent-handshake-spam-from-invalid-names.patch deleted file mode 100644 index 3d8aea9..0000000 --- a/CraftBukkit-Patches/0039-Prevent-handshake-spam-from-invalid-names.patch +++ /dev/null @@ -1,60 +0,0 @@ -From c1dcecdd3cca81c750580a70b1125012481fca7c 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 99020e7..c7ef0e1 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; -@@ -57,6 +58,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")); -@@ -384,7 +386,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.1.2 - diff --git a/CraftBukkit-Patches/0040-Save-entity-counts-for-randomly-spawned-creatures-to.patch b/CraftBukkit-Patches/0039-Save-entity-counts-for-randomly-spawned-creatures-to.patch similarity index 97% rename from CraftBukkit-Patches/0040-Save-entity-counts-for-randomly-spawned-creatures-to.patch rename to CraftBukkit-Patches/0039-Save-entity-counts-for-randomly-spawned-creatures-to.patch index 6f60daa..5f2359a 100644 --- a/CraftBukkit-Patches/0040-Save-entity-counts-for-randomly-spawned-creatures-to.patch +++ b/CraftBukkit-Patches/0039-Save-entity-counts-for-randomly-spawned-creatures-to.patch @@ -1,4 +1,4 @@ -From 47715338fc2fd1041950cdcf86997d977d596b3d Mon Sep 17 00:00:00 2001 +From a581070d4f85e5c3983652d21685db6369c2115d 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 diff --git a/CraftBukkit-Patches/0041-Thread-Naming-and-Tweaks.patch b/CraftBukkit-Patches/0040-Thread-Naming-and-Tweaks.patch similarity index 96% rename from CraftBukkit-Patches/0041-Thread-Naming-and-Tweaks.patch rename to CraftBukkit-Patches/0040-Thread-Naming-and-Tweaks.patch index df186c5..73e3fe5 100644 --- a/CraftBukkit-Patches/0041-Thread-Naming-and-Tweaks.patch +++ b/CraftBukkit-Patches/0040-Thread-Naming-and-Tweaks.patch @@ -1,4 +1,4 @@ -From 7ec562c76eba6f4ad566e41199e27c93d47d1399 Mon Sep 17 00:00:00 2001 +From 8ebad61b5d641b61b642ad178ee8c9abfde0d53e Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:50:27 +1000 Subject: [PATCH] Thread Naming and Tweaks @@ -6,7 +6,7 @@ Subject: [PATCH] Thread Naming and Tweaks Removes the sleep forever thread and adds useful names for debugging to all staged thread files. diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index e4f1cbe..048196e 100644 +index b2a4229..2a6250d 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -34,7 +34,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -31,7 +31,7 @@ index 489e184..bfd219c 100644 } diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java -index fb4ec7b..c15efc5 100644 +index a4eae65..496cfe4 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 { diff --git a/CraftBukkit-Patches/0042-Close-Unloaded-World-s-Save-Files.patch b/CraftBukkit-Patches/0041-Close-Unloaded-World-s-Save-Files.patch similarity index 94% rename from CraftBukkit-Patches/0042-Close-Unloaded-World-s-Save-Files.patch rename to CraftBukkit-Patches/0041-Close-Unloaded-World-s-Save-Files.patch index e267d3b..2c299c9 100644 --- a/CraftBukkit-Patches/0042-Close-Unloaded-World-s-Save-Files.patch +++ b/CraftBukkit-Patches/0041-Close-Unloaded-World-s-Save-Files.patch @@ -1,4 +1,4 @@ -From 7c270c3974b72f4338387b224b1bc3683062e721 Mon Sep 17 00:00:00 2001 +From 93a348f809ef9fa14ea5276b433ee93d55e640a9 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Wed, 27 Mar 2013 01:41:54 +0200 Subject: [PATCH] Close Unloaded World's Save Files @@ -18,7 +18,7 @@ index 900ed68..829f4a3 100644 public static synchronized RegionFile a(File file1, int i, int j) { File file2 = new File(file1, "region"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2485ef9..b6fe332 100644 +index 7f5f3ea..3b58d23 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -37,6 +37,8 @@ import net.minecraft.server.MinecraftServer; @@ -30,7 +30,7 @@ index 2485ef9..b6fe332 100644 import net.minecraft.server.ServerNBTManager; import net.minecraft.server.WorldLoaderServer; import net.minecraft.server.WorldManager; -@@ -831,6 +833,30 @@ public final class CraftServer implements Server { +@@ -809,6 +811,30 @@ public final class CraftServer implements Server { worlds.remove(world.getName().toLowerCase()); console.worlds.remove(console.worlds.indexOf(handle)); diff --git a/CraftBukkit-Patches/0043-Optimized-version-of-LocaleLanguage.patch b/CraftBukkit-Patches/0042-Optimized-version-of-LocaleLanguage.patch similarity index 98% rename from CraftBukkit-Patches/0043-Optimized-version-of-LocaleLanguage.patch rename to CraftBukkit-Patches/0042-Optimized-version-of-LocaleLanguage.patch index 9458e54..57982c8 100644 --- a/CraftBukkit-Patches/0043-Optimized-version-of-LocaleLanguage.patch +++ b/CraftBukkit-Patches/0042-Optimized-version-of-LocaleLanguage.patch @@ -1,4 +1,4 @@ -From 74f1a8847b7ddcd2384478a03bec9f0bced13808 Mon Sep 17 00:00:00 2001 +From 72faab2a4b5943d65aa75c3b746b2306c85a32d0 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 8 May 2013 12:09:45 +1000 Subject: [PATCH] Optimized version of LocaleLanguage diff --git a/CraftBukkit-Patches/0044-Improve-next-tick-list-performance-on-chunk-unloads-.patch b/CraftBukkit-Patches/0043-Improve-next-tick-list-performance-on-chunk-unloads-.patch similarity index 94% rename from CraftBukkit-Patches/0044-Improve-next-tick-list-performance-on-chunk-unloads-.patch rename to CraftBukkit-Patches/0043-Improve-next-tick-list-performance-on-chunk-unloads-.patch index 622d7a5..7910ed0 100644 --- a/CraftBukkit-Patches/0044-Improve-next-tick-list-performance-on-chunk-unloads-.patch +++ b/CraftBukkit-Patches/0043-Improve-next-tick-list-performance-on-chunk-unloads-.patch @@ -1,4 +1,4 @@ -From 6ea72294e723e6676db69b32f206f029b2833210 Mon Sep 17 00:00:00 2001 +From 9531eb712fffefc655e0e254b93d671019da2bdd Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Wed, 24 Apr 2013 01:43:33 -0500 Subject: [PATCH] Improve next-tick-list performance on chunk unloads, large @@ -19,7 +19,7 @@ index 52a70a1..08a4240 100644 public NextTickListEntry a(long i) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7b8e70c..93e7b9b 100644 +index 69d955f..7cdb549 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -25,8 +25,8 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate @@ -41,9 +41,9 @@ index 7b8e70c..93e7b9b 100644 + private ArrayList pendingTickEntries = new ArrayList(); // Spigot + private int nextPendingTickEntry; // Spigot private IntHashMap entitiesById; - private int aggregateTicks = 1; // Spigot -@@ -54,13 +55,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate + // CraftBukkit start +@@ -53,13 +54,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate this.entitiesById = new IntHashMap(); } @@ -63,7 +63,7 @@ index 7b8e70c..93e7b9b 100644 this.P = new org.bukkit.craftbukkit.CraftTravelAgent(this); // CraftBukkit this.scoreboard = new ScoreboardServer(minecraftserver); -@@ -446,9 +449,16 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -441,9 +444,16 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate } public boolean a(int i, int j, int k, int l) { @@ -83,7 +83,7 @@ index 7b8e70c..93e7b9b 100644 } public void a(int i, int j, int k, int l, int i1) { -@@ -481,10 +491,9 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -476,10 +486,9 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate nextticklistentry.a(j1); } @@ -97,7 +97,7 @@ index 7b8e70c..93e7b9b 100644 } } -@@ -496,10 +505,9 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -491,10 +500,9 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate nextticklistentry.a((long) i1 + this.worldData.getTime()); } @@ -111,7 +111,7 @@ index 7b8e70c..93e7b9b 100644 } public void tickEntities() { -@@ -519,11 +527,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -514,11 +522,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate } public boolean a(boolean flag) { @@ -128,7 +128,7 @@ index 7b8e70c..93e7b9b 100644 if (i > 1000) { // CraftBukkit start - If the server has too much to process over time, try to alleviate that if (i > 20 * 1000) { -@@ -539,23 +548,24 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -534,23 +543,24 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate NextTickListEntry nextticklistentry; for (int j = 0; j < i; ++j) { @@ -162,7 +162,7 @@ index 7b8e70c..93e7b9b 100644 byte b0 = 0; if (this.e(nextticklistentry.a - b0, nextticklistentry.b - b0, nextticklistentry.c - b0, nextticklistentry.a + b0, nextticklistentry.b + b0, nextticklistentry.c + b0)) { -@@ -586,52 +596,18 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -581,52 +591,18 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate } this.methodProfiler.b(); @@ -224,7 +224,7 @@ index 7b8e70c..93e7b9b 100644 } public void entityJoinedWorld(Entity entity, boolean flag) { -@@ -708,13 +684,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -703,13 +679,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate this.entitiesById = new IntHashMap(); } @@ -244,7 +244,7 @@ index 7b8e70c..93e7b9b 100644 this.b(worldsettings); super.a(worldsettings); -@@ -1001,4 +979,62 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -996,4 +974,62 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate return this.setTypeIdAndData(x, y, z, typeId, data, 3); } // CraftBukkit end diff --git a/CraftBukkit-Patches/0045-Remove-o-Option.patch b/CraftBukkit-Patches/0044-Remove-o-Option.patch similarity index 92% rename from CraftBukkit-Patches/0045-Remove-o-Option.patch rename to CraftBukkit-Patches/0044-Remove-o-Option.patch index 8b44c1e..73ac37b 100644 --- a/CraftBukkit-Patches/0045-Remove-o-Option.patch +++ b/CraftBukkit-Patches/0044-Remove-o-Option.patch @@ -1,4 +1,4 @@ -From cd7d8ce5ba9c942a20b7c740075824f042a4a5a2 Mon Sep 17 00:00:00 2001 +From 375ef52cac5e16e1375dc9428262dd691dc3c034 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 19 May 2013 18:29:48 +1000 Subject: [PATCH] Remove -o Option diff --git a/CraftBukkit-Patches/0046-Recipe-Deconstruction.patch b/CraftBukkit-Patches/0045-Recipe-Deconstruction.patch similarity index 97% rename from CraftBukkit-Patches/0046-Recipe-Deconstruction.patch rename to CraftBukkit-Patches/0045-Recipe-Deconstruction.patch index 1a3ab6c..1bf595b 100644 --- a/CraftBukkit-Patches/0046-Recipe-Deconstruction.patch +++ b/CraftBukkit-Patches/0045-Recipe-Deconstruction.patch @@ -1,4 +1,4 @@ -From 447a2540b8e5a301acf27915d2423d9b2ff98a49 Mon Sep 17 00:00:00 2001 +From 42746263ae062c4cfe850bdda0cf2118e722e0dc Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 1 Jun 2013 16:34:38 +1000 Subject: [PATCH] Recipe Deconstruction diff --git a/CraftBukkit-Patches/0047-Fix-Health-Scaling.patch b/CraftBukkit-Patches/0046-Fix-Health-Scaling.patch similarity index 97% rename from CraftBukkit-Patches/0047-Fix-Health-Scaling.patch rename to CraftBukkit-Patches/0046-Fix-Health-Scaling.patch index 839f6c5..2ea9d6a 100644 --- a/CraftBukkit-Patches/0047-Fix-Health-Scaling.patch +++ b/CraftBukkit-Patches/0046-Fix-Health-Scaling.patch @@ -1,4 +1,4 @@ -From 56451612f8d3f8100ddecca4f72ed97c69b20be1 Mon Sep 17 00:00:00 2001 +From be8e4ab02339079e2041fb9c48e8f209865d374b Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Sun, 2 Jun 2013 14:54:11 +1000 Subject: [PATCH] Fix Health Scaling diff --git a/CraftBukkit-Patches/0048-Fix-EntityShootBowEvent-with-Skeletons.patch b/CraftBukkit-Patches/0047-Fix-EntityShootBowEvent-with-Skeletons.patch similarity index 95% rename from CraftBukkit-Patches/0048-Fix-EntityShootBowEvent-with-Skeletons.patch rename to CraftBukkit-Patches/0047-Fix-EntityShootBowEvent-with-Skeletons.patch index 178aa7d..cdae506 100644 --- a/CraftBukkit-Patches/0048-Fix-EntityShootBowEvent-with-Skeletons.patch +++ b/CraftBukkit-Patches/0047-Fix-EntityShootBowEvent-with-Skeletons.patch @@ -1,4 +1,4 @@ -From b4cca3cf71f2fe61f71edfdacded8a751ccab99e Mon Sep 17 00:00:00 2001 +From 55a0a124577e32e4dfb70ae447c9ddd8568075cd Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Sun, 2 Jun 2013 15:04:37 +1000 Subject: [PATCH] Fix EntityShootBowEvent with Skeletons diff --git a/CraftBukkit-Patches/0049-Implement-Arrow-API.patch b/CraftBukkit-Patches/0048-Implement-Arrow-API.patch similarity index 93% rename from CraftBukkit-Patches/0049-Implement-Arrow-API.patch rename to CraftBukkit-Patches/0048-Implement-Arrow-API.patch index 2902889..a168e8a 100644 --- a/CraftBukkit-Patches/0049-Implement-Arrow-API.patch +++ b/CraftBukkit-Patches/0048-Implement-Arrow-API.patch @@ -1,4 +1,4 @@ -From fd7a9cd07230c70af60b51327a2dc29657e3b64d Mon Sep 17 00:00:00 2001 +From d255de2f39d158f0e7ecb8039c9f976d03baddcb Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 15:16:05 +1000 Subject: [PATCH] Implement Arrow API diff --git a/CraftBukkit-Patches/0050-Particle-API.patch b/CraftBukkit-Patches/0049-Particle-API.patch similarity index 97% rename from CraftBukkit-Patches/0050-Particle-API.patch rename to CraftBukkit-Patches/0049-Particle-API.patch index 4ac60a5..e43cd38 100644 --- a/CraftBukkit-Patches/0050-Particle-API.patch +++ b/CraftBukkit-Patches/0049-Particle-API.patch @@ -1,4 +1,4 @@ -From 4fde28828a4820deccf067f854ecae8e3eb8996b Mon Sep 17 00:00:00 2001 +From b15953996bfacb57262151924528753e9ebd5099 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 16:14:30 +1000 Subject: [PATCH] Particle API @@ -43,10 +43,10 @@ index 7de0de5..7eca388 100644 datavalue = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4439ebc..56d3d32 100644 +index edc59b1..0778a66 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -885,31 +885,21 @@ public class CraftWorld implements World { +@@ -766,31 +766,21 @@ public class CraftWorld implements World { } else { Validate.isTrue(effect.getData() == null, "Wrong kind of data for this effect!"); } @@ -88,7 +88,7 @@ index 4439ebc..56d3d32 100644 public T spawn(Location location, Class clazz) throws IllegalArgumentException { return spawn(location, clazz, SpawnReason.CUSTOM); } -@@ -1388,6 +1378,62 @@ public class CraftWorld implements World { +@@ -1269,6 +1259,62 @@ public class CraftWorld implements World { // Spigot start private final Spigot spigot = new Spigot() { @@ -152,7 +152,7 @@ index 4439ebc..56d3d32 100644 public Spigot spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3d39d07..8ee2c3b 100644 +index d70c110..43e953e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -266,13 +266,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -236,5 +236,5 @@ index 3d39d07..8ee2c3b 100644 public Spigot spigot() -- -1.8.3 +1.8.1.2 diff --git a/CraftBukkit-Patches/0050-Hopper-Cooldowns.patch b/CraftBukkit-Patches/0050-Hopper-Cooldowns.patch new file mode 100644 index 0000000..1219acd --- /dev/null +++ b/CraftBukkit-Patches/0050-Hopper-Cooldowns.patch @@ -0,0 +1,86 @@ +From 36772025aed5f5fdbac6cdee69450f411ee4f462 Mon Sep 17 00:00:00 2001 +From: DerFlash +Date: Sun, 2 Jun 2013 16:23:46 +1000 +Subject: [PATCH] Hopper Cooldowns + + +diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java +index f6d269d..1f69c7b 100644 +--- a/src/main/java/net/minecraft/server/TileEntityHopper.java ++++ b/src/main/java/net/minecraft/server/TileEntityHopper.java +@@ -181,16 +181,19 @@ public class TileEntityHopper extends TileEntity implements IHopper { + boolean flag = this.u() | suckInItems(this); + + if (flag) { +- this.c(8); ++ this.c(world.spigotConfig.hopperTransfer); // Spigot + this.update(); + return true; + } + } +- +- return false; +- } else { +- return false; + } ++ // Spigot start ++ if ( this.c == 0 ) ++ { ++ this.c( world.spigotConfig.hopperCheck ); ++ } ++ // Spigot end ++ return false; + } + + private boolean u() { +@@ -217,7 +220,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { + this.getWorld().getServer().getPluginManager().callEvent(event); + if (event.isCancelled()) { + this.setItem(i, itemstack); +- this.c(8); // Delay hopper checks ++ this.c(world.spigotConfig.hopperTransfer); // Spigot + return false; + } + ItemStack itemstack1 = addItem(iinventory, CraftItemStack.asNMSCopy(event.getItem()), Facing.OPPOSITE_FACING[BlockHopper.c(this.p())]); +@@ -298,9 +301,9 @@ public class TileEntityHopper extends TileEntity implements IHopper { + iinventory.setItem(i, itemstack1); + + if (ihopper instanceof TileEntityHopper) { +- ((TileEntityHopper) ihopper).c(8); // Delay hopper checks ++ ((TileEntityHopper) ihopper).c(ihopper.getWorld().spigotConfig.hopperTransfer); // Spigot + } else if (ihopper instanceof EntityMinecartHopper) { +- ((EntityMinecartHopper) ihopper).n(4); // Delay hopper minecart checks ++ ((EntityMinecartHopper) ihopper).n(ihopper.getWorld().spigotConfig.hopperTransfer / 2); // Spigot + } + + return false; +@@ -404,7 +407,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { + + if (flag) { + if (iinventory instanceof TileEntityHopper) { +- ((TileEntityHopper) iinventory).c(8); ++ ((TileEntityHopper) iinventory).c(((TileEntityHopper) iinventory).world.spigotConfig.hopperTransfer); // Spigot + } + + iinventory.update(); +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 86d6939..9cc89a3 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -183,4 +183,13 @@ public class SpigotWorldConfig + maxTrackingRange = getInt( "entity-tracking-range.other", maxTrackingRange ); + log( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Other " + maxTrackingRange ); + } ++ ++ public int hopperTransfer = 8; ++ public int hopperCheck = 8; ++ private void hoppers() ++ { ++ hopperCheck = getInt( "ticks-per.hopper-check", hopperCheck ); ++ hopperTransfer = getInt( "ticks-per.hopper-transfer", hopperTransfer ); ++ log( "Hopper Transfer: " + hopperTransfer + " Hopper Check: " + hopperCheck ); ++ } + } +-- +1.8.1.2 + diff --git a/CraftBukkit-Patches/0051-Hopper-Cooldowns.patch b/CraftBukkit-Patches/0051-Hopper-Cooldowns.patch deleted file mode 100644 index 3badcd6..0000000 --- a/CraftBukkit-Patches/0051-Hopper-Cooldowns.patch +++ /dev/null @@ -1,103 +0,0 @@ -From eb047d75ceeb8a7efd65347ced86047bb40205e7 Mon Sep 17 00:00:00 2001 -From: DerFlash -Date: Sun, 2 Jun 2013 16:23:46 +1000 -Subject: [PATCH] Hopper Cooldowns - - -diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index f6d269d..88b2cb0 100644 ---- a/src/main/java/net/minecraft/server/TileEntityHopper.java -+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java -@@ -181,16 +181,19 @@ public class TileEntityHopper extends TileEntity implements IHopper { - boolean flag = this.u() | suckInItems(this); - - if (flag) { -- this.c(8); -+ this.c(org.bukkit.craftbukkit.Spigot.hopperTransferCooldown); // Spigot - this.update(); - return true; - } - } -- -- return false; -- } else { -- return false; - } -+ // Spigot start -+ if ( this.c == 0 ) -+ { -+ this.c( org.bukkit.craftbukkit.Spigot.hopperCheckCooldown ); -+ } -+ // Spigot end -+ return false; - } - - private boolean u() { -@@ -217,7 +220,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { - this.getWorld().getServer().getPluginManager().callEvent(event); - if (event.isCancelled()) { - this.setItem(i, itemstack); -- this.c(8); // Delay hopper checks -+ this.c(org.bukkit.craftbukkit.Spigot.hopperTransferCooldown); // Spigot - return false; - } - ItemStack itemstack1 = addItem(iinventory, CraftItemStack.asNMSCopy(event.getItem()), Facing.OPPOSITE_FACING[BlockHopper.c(this.p())]); -@@ -298,9 +301,9 @@ public class TileEntityHopper extends TileEntity implements IHopper { - iinventory.setItem(i, itemstack1); - - if (ihopper instanceof TileEntityHopper) { -- ((TileEntityHopper) ihopper).c(8); // Delay hopper checks -+ ((TileEntityHopper) ihopper).c(org.bukkit.craftbukkit.Spigot.hopperTransferCooldown); // Spigot - } else if (ihopper instanceof EntityMinecartHopper) { -- ((EntityMinecartHopper) ihopper).n(4); // Delay hopper minecart checks -+ ((EntityMinecartHopper) ihopper).n(org.bukkit.craftbukkit.Spigot.hopperTransferCooldown / 2); // Spigot - } - - return false; -@@ -404,7 +407,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { - - if (flag) { - if (iinventory instanceof TileEntityHopper) { -- ((TileEntityHopper) iinventory).c(8); -+ ((TileEntityHopper) iinventory).c(org.bukkit.craftbukkit.Spigot.hopperTransferCooldown); // Spigot - } - - iinventory.update(); -diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index c7ef0e1..bbfcd97 100644 ---- a/src/main/java/org/bukkit/craftbukkit/Spigot.java -+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java -@@ -59,6 +59,8 @@ 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}$"); -+ public static int hopperTransferCooldown = 8; -+ public static int hopperCheckCooldown = 8; - - public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) { - commandMap.register("bukkit", new org.bukkit.craftbukkit.command.TicksPerSecondCommand("tps")); -@@ -97,6 +99,8 @@ public class Spigot { - tabPing = configuration.getBoolean("settings.tab-ping", tabPing); - bungeeIPs = configuration.getStringList("settings.bungee-proxies"); - textureResolution = configuration.getInt("settings.texture-resolution", textureResolution); -+ hopperTransferCooldown = configuration.getInt("ticks-per.hopper-transfer", hopperTransferCooldown); -+ hopperCheckCooldown = configuration.getInt("ticks-per.hopper-check", hopperCheckCooldown); - - if (metrics == null) { - try { -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 5d2ef1f..c056762 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -83,6 +83,8 @@ ticks-per: - animal-spawns: 400 - monster-spawns: 1 - autosave: 0 -+ hopper-transfer: 8 -+ hopper-check: 8 - auto-updater: - enabled: true - on-broken: [warn-console, warn-ops] --- -1.8.1.2 - diff --git a/CraftBukkit-Patches/0052-Prevent-Shutdown-Hang.patch b/CraftBukkit-Patches/0051-Prevent-Shutdown-Hang.patch similarity index 92% rename from CraftBukkit-Patches/0052-Prevent-Shutdown-Hang.patch rename to CraftBukkit-Patches/0051-Prevent-Shutdown-Hang.patch index 8f0760d..c765d0b 100644 --- a/CraftBukkit-Patches/0052-Prevent-Shutdown-Hang.patch +++ b/CraftBukkit-Patches/0051-Prevent-Shutdown-Hang.patch @@ -1,4 +1,4 @@ -From 88c21014a866791f3be6e9b2c8778eb6dda3d506 Mon Sep 17 00:00:00 2001 +From fdd4ba069b61f6dde73fbf37852dc2e5b99a09ee Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 11:54:32 +1000 Subject: [PATCH] Prevent Shutdown Hang @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent Shutdown Hang Prevents server hanging if players disconnect during the shutdown sequence. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d5387f3..e5d2710 100644 +index c61e959..8b58243 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1071,7 +1071,14 @@ public abstract class PlayerList { diff --git a/CraftBukkit-Patches/0053-Implement-SpawnerSpawnEvent.patch b/CraftBukkit-Patches/0052-Implement-SpawnerSpawnEvent.patch similarity index 98% rename from CraftBukkit-Patches/0053-Implement-SpawnerSpawnEvent.patch rename to CraftBukkit-Patches/0052-Implement-SpawnerSpawnEvent.patch index d72dbf7..1d77adb 100644 --- a/CraftBukkit-Patches/0053-Implement-SpawnerSpawnEvent.patch +++ b/CraftBukkit-Patches/0052-Implement-SpawnerSpawnEvent.patch @@ -1,4 +1,4 @@ -From 7166f5c5d632bd3598ae824985e27a73a9befd2c Mon Sep 17 00:00:00 2001 +From c8083dfc6564728b5f536ca9696add3be6b6c246 Mon Sep 17 00:00:00 2001 From: Andy Shulman Date: Mon, 15 Apr 2013 20:06:37 -0500 Subject: [PATCH] Implement SpawnerSpawnEvent. diff --git a/CraftBukkit-Patches/0054-Firework-Meta-Crash-Fix.patch b/CraftBukkit-Patches/0053-Firework-Meta-Crash-Fix.patch similarity index 94% rename from CraftBukkit-Patches/0054-Firework-Meta-Crash-Fix.patch rename to CraftBukkit-Patches/0053-Firework-Meta-Crash-Fix.patch index 061df6f..bc02ec0 100644 --- a/CraftBukkit-Patches/0054-Firework-Meta-Crash-Fix.patch +++ b/CraftBukkit-Patches/0053-Firework-Meta-Crash-Fix.patch @@ -1,4 +1,4 @@ -From 6eb432158c3fde080bddf7a8e643b5c355bd023e Mon Sep 17 00:00:00 2001 +From 28e3a04e9578daab00bac557fb9f8ec7246b35af Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 15 Jun 2013 21:34:48 +1000 Subject: [PATCH] Firework Meta Crash Fix diff --git a/CraftBukkit-Patches/0055-Do-Not-Search-for-Offline-Players.patch b/CraftBukkit-Patches/0054-Do-Not-Search-for-Offline-Players.patch similarity index 82% rename from CraftBukkit-Patches/0055-Do-Not-Search-for-Offline-Players.patch rename to CraftBukkit-Patches/0054-Do-Not-Search-for-Offline-Players.patch index 0737fe0..4dbd87f 100644 --- a/CraftBukkit-Patches/0055-Do-Not-Search-for-Offline-Players.patch +++ b/CraftBukkit-Patches/0054-Do-Not-Search-for-Offline-Players.patch @@ -1,4 +1,4 @@ -From f0c3892e80dc22f3fb93e7ee8177da61c7c54204 Mon Sep 17 00:00:00 2001 +From 73b733afa224073a9ea2f64bafcc94db3230e8e0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jun 2013 08:20:26 +1000 Subject: [PATCH] Do Not Search for Offline Players @@ -6,10 +6,10 @@ Subject: [PATCH] Do Not Search for Offline Players By default we do not want to search as this leads to massive load times for plugins wanting to do mass data lookups. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b6fe332..76659bc 100644 +index 3b58d23..71643cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1108,7 +1108,7 @@ public final class CraftServer implements Server { +@@ -1086,7 +1086,7 @@ public final class CraftServer implements Server { } public OfflinePlayer getOfflinePlayer(String name) { From c3faaa3d242d1d6630e40c2ab9bf2ef5ae6792c1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 16:47:56 +1000 Subject: [PATCH 13/40] Rename Spigot changes patch to growth rates and simplify its contents --- ...ges.patch => 0006-Crop-Growth-Rates.patch} | 124 +----------------- 1 file changed, 7 insertions(+), 117 deletions(-) rename CraftBukkit-Patches/{0006-Spigot-Changes.patch => 0006-Crop-Growth-Rates.patch} (60%) diff --git a/CraftBukkit-Patches/0006-Spigot-Changes.patch b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch similarity index 60% rename from CraftBukkit-Patches/0006-Spigot-Changes.patch rename to CraftBukkit-Patches/0006-Crop-Growth-Rates.patch index c8e3897..9f8cf64 100644 --- a/CraftBukkit-Patches/0006-Spigot-Changes.patch +++ b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch @@ -1,7 +1,7 @@ -From c2d9713c3da77a4e39cbbea17070b2d41699a913 Mon Sep 17 00:00:00 2001 +From 77958016c76679e58d9475984109f0ec9830ceee Mon Sep 17 00:00:00 2001 From: md_5 -Date: Thu, 20 Jun 2013 18:21:09 +1000 -Subject: [PATCH] Spigot Changes +Date: Fri, 21 Jun 2013 16:44:14 +1000 +Subject: [PATCH] Crop Growth Rates diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java @@ -106,7 +106,7 @@ index 8657860..cf52501 100644 world.setData(i, j, k, 0, 4); } else { diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java -index 3b00939..d48677a 100644 +index 3b00939..ea34899 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java +++ b/src/main/java/net/minecraft/server/BlockSapling.java @@ -26,7 +26,7 @@ public class BlockSapling extends BlockFlower { @@ -114,7 +114,7 @@ index 3b00939..d48677a 100644 if (!world.isStatic) { super.a(world, i, j, k, random); - if (world.getLightLevel(i, j + 1, k) >= 9 && random.nextInt(7) == 0) { -+ if (world.getLightLevel(i, j + 1, k) >= 9 && (random.nextInt(Math.max(2, (int) ((world.growthOdds / world.spigotConfig.tickAggregate / world.spigotConfig.saplingModifier * 7) + 0.5F))) == 0)) { // Spigot ++ if (world.getLightLevel(i, j + 1, k) >= 9 && (random.nextInt(Math.max(2, (int) ((world.growthOdds / world.spigotConfig.saplingModifier * 7) + 0.5F))) == 0)) { // Spigot this.grow(world, i, j, k, random, false, null, null); // CraftBukkit - added bonemeal, player and itemstack } } @@ -131,95 +131,6 @@ index 8339a35..c7e2344 100644 int l = world.getData(i, j, k); if (l < 7) { -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 018c314..52fa75a 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -845,8 +845,20 @@ public class PlayerConnection extends Connection { - - this.chat(s, packet3chat.a_()); - -+ // Spigot start -+ boolean isCounted = true; -+ if (server.spamGuardExclusions != null) { -+ for (String excluded : server.spamGuardExclusions) { -+ if (s.startsWith(excluded)) { -+ isCounted = false; -+ break; -+ } -+ } -+ } - // This section stays because it is only applicable to packets -- if (chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam -+ if (isCounted && chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam -+ // Spigot end -+ // CraftBukkit start - if (packet3chat.a_()) { - Waitable waitable = new Waitable() { - @Override -@@ -967,7 +979,7 @@ public class PlayerConnection extends Connection { - } - - try { -- this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // CraftBukkit -+ if (org.spigotmc.SpigotConfig.logCommands) this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // Spigot - if (this.server.dispatchCommand(event.getPlayer(), event.getMessage().substring(1))) { - return; - } -@@ -1554,8 +1566,9 @@ public class PlayerConnection extends Connection { - flag = false; - } else { - for (i = 0; i < packet130updatesign.lines[j].length(); ++i) { -- if (SharedConstants.allowedCharacters.indexOf(packet130updatesign.lines[j].charAt(i)) < 0) { -+ if (!SharedConstants.isAllowedChatCharacter(packet130updatesign.lines[j].charAt(i))) { - flag = false; -+ break; - } - } - } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6cb50b7..2567bde 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -208,7 +208,7 @@ 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")); -- updater.setEnabled(configuration.getBoolean("auto-updater.enabled")); -+ updater.setEnabled(false); - updater.setSuggestChannels(configuration.getBoolean("auto-updater.suggest-channels")); - updater.getOnBroken().addAll(configuration.getStringList("auto-updater.on-broken")); - updater.getOnUpdate().addAll(configuration.getStringList("auto-updater.on-update")); -@@ -535,6 +535,7 @@ public final class CraftServer implements Server { - - ((DedicatedServer) console).propertyManager = config; - -+ ((SimplePluginManager) pluginManager).useTimings(configuration.getBoolean("settings.plugin-profiling")); // Spigot - 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); -@@ -1326,7 +1327,7 @@ public final class CraftServer implements Server { - public List tabCompleteCommand(Player player, String message) { - List completions = null; - try { -- completions = getCommandMap().tabComplete(player, message.substring(1)); -+ completions = (org.spigotmc.SpigotConfig.tabComplete) ? getCommandMap().tabComplete(player, message.substring(1)) : null; // Spigot - } catch (CommandException ex) { - player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); - getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); -diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -index c896ba2..e99cb22 100644 ---- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -@@ -40,7 +40,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider Date: Fri, 21 Jun 2013 16:49:33 +1000 Subject: [PATCH 14/40] Remove some CraftBukkit pull requests that don't have any functional benefit at the moment. --- .../0010-Merge-tweaks-and-configuration.patch | 6 +-- CraftBukkit-Patches/0013-View-Distance.patch | 6 +-- .../0018-Improved-Timings-System.patch | 10 ++--- CraftBukkit-Patches/0019-Orebfuscator.patch | 6 +-- .../0022-Entity-Activation-Range.patch | 6 +-- CraftBukkit-Patches/0025-Netty.patch | 6 +-- ...patch => 0026-PlayerItemDamageEvent.patch} | 2 +- ...ion-itself-instead-of-next-to-bed-Fi.patch | 45 ------------------- ...ch => 0027-Faster-UUID-for-entities.patch} | 4 +- ...y-on-CraftPlayer.getBedSpawnLocation.patch | 30 ------------- ...d-missing-HangingBreakEvent-when-Ent.patch | 36 --------------- ...ch => 0028-Prevent-NPE-in-CraftSign.patch} | 2 +- ...-3667-Faux-sleepers-wake-up-normally.patch | 22 --------- ...atch => 0029-Entity-Tracking-Ranges.patch} | 6 +-- ...rt.patch => 0030-BungeeCord-Support.patch} | 8 ++-- ... => 0031-Limit-Custom-Map-Rendering.patch} | 2 +- ...ption-for-disabled-plugin-tasks.-Fi.patch} | 2 +- ...> 0033-Enable-Improved-ping-sending.patch} | 8 ++-- ...t-handshake-spam-from-invalid-names.patch} | 2 +- ...s-for-randomly-spawned-creatures-to.patch} | 2 +- ...ch => 0036-Thread-Naming-and-Tweaks.patch} | 2 +- ...7-Close-Unloaded-World-s-Save-Files.patch} | 6 +-- ...Optimized-version-of-LocaleLanguage.patch} | 2 +- ...-list-performance-on-chunk-unloads-.patch} | 2 +- ...ption.patch => 0040-Remove-o-Option.patch} | 2 +- ...patch => 0041-Recipe-Deconstruction.patch} | 2 +- ...ng.patch => 0042-Fix-Health-Scaling.patch} | 2 +- ...-EntityShootBowEvent-with-Skeletons.patch} | 2 +- ...I.patch => 0044-Implement-Arrow-API.patch} | 2 +- ...icle-API.patch => 0045-Particle-API.patch} | 6 +-- ...owns.patch => 0046-Hopper-Cooldowns.patch} | 6 +-- ...patch => 0047-Prevent-Shutdown-Hang.patch} | 6 +-- ...=> 0048-Implement-SpawnerSpawnEvent.patch} | 2 +- ...tch => 0049-Firework-Meta-Crash-Fix.patch} | 2 +- ...0-Do-Not-Search-for-Offline-Players.patch} | 6 +-- 35 files changed, 64 insertions(+), 197 deletions(-) rename CraftBukkit-Patches/{0030-PlayerItemDamageEvent.patch => 0026-PlayerItemDamageEvent.patch} (97%) delete mode 100644 CraftBukkit-Patches/0026-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch rename CraftBukkit-Patches/{0031-Faster-UUID-for-entities.patch => 0027-Faster-UUID-for-entities.patch} (91%) delete mode 100644 CraftBukkit-Patches/0027-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch delete mode 100644 CraftBukkit-Patches/0028-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch rename CraftBukkit-Patches/{0032-Prevent-NPE-in-CraftSign.patch => 0028-Prevent-NPE-in-CraftSign.patch} (96%) delete mode 100644 CraftBukkit-Patches/0029-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch rename CraftBukkit-Patches/{0033-Entity-Tracking-Ranges.patch => 0029-Entity-Tracking-Ranges.patch} (96%) rename CraftBukkit-Patches/{0034-BungeeCord-Support.patch => 0030-BungeeCord-Support.patch} (96%) rename CraftBukkit-Patches/{0035-Limit-Custom-Map-Rendering.patch => 0031-Limit-Custom-Map-Rendering.patch} (98%) rename CraftBukkit-Patches/{0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch => 0032-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch} (95%) rename CraftBukkit-Patches/{0037-Enable-Improved-ping-sending.patch => 0033-Enable-Improved-ping-sending.patch} (92%) rename CraftBukkit-Patches/{0038-Prevent-handshake-spam-from-invalid-names.patch => 0034-Prevent-handshake-spam-from-invalid-names.patch} (94%) rename CraftBukkit-Patches/{0039-Save-entity-counts-for-randomly-spawned-creatures-to.patch => 0035-Save-entity-counts-for-randomly-spawned-creatures-to.patch} (97%) rename CraftBukkit-Patches/{0040-Thread-Naming-and-Tweaks.patch => 0036-Thread-Naming-and-Tweaks.patch} (98%) rename CraftBukkit-Patches/{0041-Close-Unloaded-World-s-Save-Files.patch => 0037-Close-Unloaded-World-s-Save-Files.patch} (94%) rename CraftBukkit-Patches/{0042-Optimized-version-of-LocaleLanguage.patch => 0038-Optimized-version-of-LocaleLanguage.patch} (98%) rename CraftBukkit-Patches/{0043-Improve-next-tick-list-performance-on-chunk-unloads-.patch => 0039-Improve-next-tick-list-performance-on-chunk-unloads-.patch} (99%) rename CraftBukkit-Patches/{0044-Remove-o-Option.patch => 0040-Remove-o-Option.patch} (92%) rename CraftBukkit-Patches/{0045-Recipe-Deconstruction.patch => 0041-Recipe-Deconstruction.patch} (97%) rename CraftBukkit-Patches/{0046-Fix-Health-Scaling.patch => 0042-Fix-Health-Scaling.patch} (97%) rename CraftBukkit-Patches/{0047-Fix-EntityShootBowEvent-with-Skeletons.patch => 0043-Fix-EntityShootBowEvent-with-Skeletons.patch} (95%) rename CraftBukkit-Patches/{0048-Implement-Arrow-API.patch => 0044-Implement-Arrow-API.patch} (93%) rename CraftBukkit-Patches/{0049-Particle-API.patch => 0045-Particle-API.patch} (98%) rename CraftBukkit-Patches/{0050-Hopper-Cooldowns.patch => 0046-Hopper-Cooldowns.patch} (96%) rename CraftBukkit-Patches/{0051-Prevent-Shutdown-Hang.patch => 0047-Prevent-Shutdown-Hang.patch} (87%) rename CraftBukkit-Patches/{0052-Implement-SpawnerSpawnEvent.patch => 0048-Implement-SpawnerSpawnEvent.patch} (98%) rename CraftBukkit-Patches/{0053-Firework-Meta-Crash-Fix.patch => 0049-Firework-Meta-Crash-Fix.patch} (94%) rename CraftBukkit-Patches/{0054-Do-Not-Search-for-Offline-Players.patch => 0050-Do-Not-Search-for-Offline-Players.patch} (82%) diff --git a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch index 3074a58..bd981d5 100644 --- a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch +++ b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch @@ -1,4 +1,4 @@ -From 09bfa8a119a405550b9519bd84f11e3ae0f70f6b Mon Sep 17 00:00:00 2001 +From 9ce8fe366d6c6f3fb6d9f358782bd67f7286f869 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 @@ -69,10 +69,10 @@ index afe3e4d..d7e5301 100644 if (event != null && (event.isCancelled() || entity.dead)) { entity.dead = true; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 18278c6..4c16ed7 100644 +index 8954c99..799bbc8 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -114,4 +114,18 @@ public class SpigotWorldConfig +@@ -93,4 +93,18 @@ public class SpigotWorldConfig wheatModifier = getInt( "growth.wheat-modifier", wheatModifier ); log( "Cactus Growth Modifier: " + cactusModifier + "%" ); } diff --git a/CraftBukkit-Patches/0013-View-Distance.patch b/CraftBukkit-Patches/0013-View-Distance.patch index f7fc24a..1aac7ad 100644 --- a/CraftBukkit-Patches/0013-View-Distance.patch +++ b/CraftBukkit-Patches/0013-View-Distance.patch @@ -1,4 +1,4 @@ -From 98da2b7084a875327ad23ed8a913bf02e0e36fb6 Mon Sep 17 00:00:00 2001 +From 16ce161417a943918e27f36561a1f611e2cc9f78 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:52:41 +1100 Subject: [PATCH] View Distance @@ -32,10 +32,10 @@ index 6c3fcf1..614a17f 100644 this.entitiesById = new IntHashMap(); } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 4c16ed7..de5d17e 100644 +index 799bbc8..0e3f855 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -128,4 +128,11 @@ public class SpigotWorldConfig +@@ -107,4 +107,11 @@ public class SpigotWorldConfig expMerge = getFloat( "merge-radius.exp", expMerge ); log( "Experience Merge Radius: " + expMerge ); } diff --git a/CraftBukkit-Patches/0018-Improved-Timings-System.patch b/CraftBukkit-Patches/0018-Improved-Timings-System.patch index c85bba3..5046c39 100644 --- a/CraftBukkit-Patches/0018-Improved-Timings-System.patch +++ b/CraftBukkit-Patches/0018-Improved-Timings-System.patch @@ -1,4 +1,4 @@ -From 48b529e33646533eb0028189bf7836e56423e991 Mon Sep 17 00:00:00 2001 +From 6a85506600fad57b57f604edc72a6ef581d12845 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 10 Jan 2013 00:18:11 -0500 Subject: [PATCH] Improved Timings System @@ -213,10 +213,10 @@ index 3c80340..db396b3 100644 this.methodProfiler.b(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 52fa75a..93082ff 100644 +index 018c314..8deba1b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -968,6 +968,7 @@ public class PlayerConnection extends Connection { +@@ -956,6 +956,7 @@ public class PlayerConnection extends Connection { // CraftBukkit end private void handleCommand(String s) { @@ -224,7 +224,7 @@ index 52fa75a..93082ff 100644 // CraftBukkit start CraftPlayer player = this.getPlayer(); -@@ -975,19 +976,23 @@ public class PlayerConnection extends Connection { +@@ -963,19 +964,23 @@ public class PlayerConnection extends Connection { this.server.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -233,7 +233,7 @@ index 52fa75a..93082ff 100644 } try { - if (org.spigotmc.SpigotConfig.logCommands) this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // Spigot + this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // CraftBukkit if (this.server.dispatchCommand(event.getPlayer(), event.getMessage().substring(1))) { + org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot return; diff --git a/CraftBukkit-Patches/0019-Orebfuscator.patch b/CraftBukkit-Patches/0019-Orebfuscator.patch index a3bb2c1..69a02eb 100644 --- a/CraftBukkit-Patches/0019-Orebfuscator.patch +++ b/CraftBukkit-Patches/0019-Orebfuscator.patch @@ -1,4 +1,4 @@ -From c50921dc69979fb97674486de51a073d19273170 Mon Sep 17 00:00:00 2001 +From 845b5bc50a2e34500f94692cd0cb1a324b3ae329 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator @@ -316,7 +316,7 @@ index 0000000..74ee741 + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index de5d17e..2f514a0 100644 +index 0e3f855..52e060a 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -1,5 +1,6 @@ @@ -326,7 +326,7 @@ index de5d17e..2f514a0 100644 import java.util.List; import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; -@@ -135,4 +136,25 @@ public class SpigotWorldConfig +@@ -114,4 +115,25 @@ public class SpigotWorldConfig viewDistance = getInt( "view-distance", Bukkit.getViewDistance() ); log( "View Distance: " + viewDistance ); } diff --git a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch index 09fad96..74a9512 100644 --- a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From 118a860a1790b95d1992033d9735aaa8c3e405af Mon Sep 17 00:00:00 2001 +From 54acbfac602e85d68bada6c0815e58fd77c3ed98 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -462,10 +462,10 @@ index 0000000..93ce20e + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 2f514a0..2824b17 100644 +index 52e060a..27323a0 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -157,4 +157,15 @@ public class SpigotWorldConfig +@@ -136,4 +136,15 @@ public class SpigotWorldConfig antiXrayInstance = new AntiXray( this ); } diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index 3170ecb..6c3ab61 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,4 +1,4 @@ -From da93c0bd48b4e34c4561ba975e7561cf60be9ef0 Mon Sep 17 00:00:00 2001 +From bfb9a7a900a658c78665a0397cd79789ad535056 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:47:32 +1000 Subject: [PATCH] Netty @@ -210,10 +210,10 @@ index 17cfacc..a945892 100644 this.b = true; } catch (Exception exception) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2567bde..7f5f3ea 100644 +index 6cb50b7..20ba4b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1367,4 +1367,20 @@ public final class CraftServer implements Server { +@@ -1366,4 +1366,20 @@ public final class CraftServer implements Server { public CraftScoreboardManager getScoreboardManager() { return scoreboardManager; } diff --git a/CraftBukkit-Patches/0030-PlayerItemDamageEvent.patch b/CraftBukkit-Patches/0026-PlayerItemDamageEvent.patch similarity index 97% rename from CraftBukkit-Patches/0030-PlayerItemDamageEvent.patch rename to CraftBukkit-Patches/0026-PlayerItemDamageEvent.patch index 3a87611..c225515 100644 --- a/CraftBukkit-Patches/0030-PlayerItemDamageEvent.patch +++ b/CraftBukkit-Patches/0026-PlayerItemDamageEvent.patch @@ -1,4 +1,4 @@ -From d0c3da40bb7be3c11ed8bfc098549dc5e3ddb97d Mon Sep 17 00:00:00 2001 +From f52dba2bbbe1ac2d868fc37d95d8a33e4e17a46e 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/0026-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch b/CraftBukkit-Patches/0026-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch deleted file mode 100644 index e34d861..0000000 --- a/CraftBukkit-Patches/0026-Return-bed-location-itself-instead-of-next-to-bed-Fi.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 22c7f9a277249291f162a01327fad44bf3d3cbd1 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 - BUKKIT-3604 - - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7cae665..8ec84e1 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -628,10 +628,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - ChunkCoordinates bed = getHandle().getBed(); - - if (world != null && bed != null) { -- bed = EntityHuman.getBed(((CraftWorld) world).getHandle(), bed, getHandle().isRespawnForced()); -- if (bed != null) { -+ if (getHandle().isRespawnForced()) { - return new Location(world, bed.x, bed.y, bed.z); - } -+ -+ int cx = bed.x >> 4; -+ int cz = bed.z >> 4; -+ boolean before = world.isChunkLoaded(cx, cz); -+ -+ if (!before) { -+ world.loadChunk(cx, cz); -+ } -+ -+ Location location = null; -+ if (world.getBlockTypeIdAt(bed.x, bed.y, bed.z) == Block.BED.id) { -+ location = new Location(world, bed.x, bed.y, bed.z); -+ } -+ -+ if (!before) { -+ world.unloadChunk(cx, cz); -+ } -+ -+ return location; - } - return null; - } --- -1.8.1.2 - diff --git a/CraftBukkit-Patches/0031-Faster-UUID-for-entities.patch b/CraftBukkit-Patches/0027-Faster-UUID-for-entities.patch similarity index 91% rename from CraftBukkit-Patches/0031-Faster-UUID-for-entities.patch rename to CraftBukkit-Patches/0027-Faster-UUID-for-entities.patch index 84c6c33..49e4e05 100644 --- a/CraftBukkit-Patches/0031-Faster-UUID-for-entities.patch +++ b/CraftBukkit-Patches/0027-Faster-UUID-for-entities.patch @@ -1,4 +1,4 @@ -From 25514a2f378763e974783799c57dee62c67c1d20 Mon Sep 17 00:00:00 2001 +From dbd0d8f7e14ce0dbe01087ea315ef44fc26193ab 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 @@ -6,7 +6,7 @@ Subject: [PATCH] Faster UUID for entities It is overkill to create a new SecureRandom on each entity create and then use it to make a new Entity ID for every entity instance created. Instead we will just use a pseudo random UUID based off the random instance we already have. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 401edcc..a2a4f5a 100644 +index 438a26a..97b2522 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -154,7 +154,7 @@ public abstract class Entity { diff --git a/CraftBukkit-Patches/0027-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch b/CraftBukkit-Patches/0027-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch deleted file mode 100644 index 5ec1ff7..0000000 --- a/CraftBukkit-Patches/0027-Remove-dependency-on-CraftPlayer.getBedSpawnLocation.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 2f87ffb2fd330295fe5b602fc19cb3b0e0656570 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 - BUKKIT-3604 - - -diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0e3a6a1..305855b 100644 ---- a/src/main/java/net/minecraft/server/PlayerList.java -+++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -495,7 +495,14 @@ public abstract class PlayerList { - if (exitWorld != null) { - if ((cause == TeleportCause.END_PORTAL) && (i == 0)) { - // THE_END -> NORMAL; use bed if available, otherwise default spawn -- exit = ((org.bukkit.craftbukkit.entity.CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation(); -+ ChunkCoordinates chunkcoordinates = entityplayer.getBed(); -+ CraftWorld spawnWorld = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld); -+ if (spawnWorld != null && chunkcoordinates != null) { -+ ChunkCoordinates chunkcoordinates1 = EntityHuman.getBed(spawnWorld.getHandle(), chunkcoordinates, entityplayer.isRespawnForced()); -+ if (chunkcoordinates1 != null) { -+ exit = new Location(spawnWorld, chunkcoordinates1.x + 0.5, chunkcoordinates1.y, chunkcoordinates1.z + 0.5); -+ } -+ } - if (exit == null || ((CraftWorld) exit.getWorld()).getHandle().dimension != 0) { - exit = exitWorld.getWorld().getSpawnLocation(); - } --- -1.8.1.2 - diff --git a/CraftBukkit-Patches/0028-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch b/CraftBukkit-Patches/0028-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch deleted file mode 100644 index 99b44a1..0000000 --- a/CraftBukkit-Patches/0028-BUKKIT-3661-fixed-missing-HangingBreakEvent-when-Ent.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 7a8988d8f7c6f44262bee0be69d684109e2a863c 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 - EntityHanging moves - - -diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java -index f697d85..1dfb02f 100644 ---- a/src/main/java/net/minecraft/server/EntityHanging.java -+++ b/src/main/java/net/minecraft/server/EntityHanging.java -@@ -260,6 +260,21 @@ public abstract class EntityHanging extends Entity { - if (!this.world.isStatic && !this.dead && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) { - if (dead) return; // CraftBukkit - -+ // CraftBukkit start -+ HangingBreakEvent event = new HangingBreakEvent((Hanging) this.getBukkitEntity(), HangingBreakEvent.RemoveCause.PHYSICS); -+ this.world.getServer().getPluginManager().callEvent(event); -+ -+ PaintingBreakEvent paintingEvent = null; -+ if (this instanceof EntityPainting) { -+ // Fire old painting event until it can be removed -+ paintingEvent = new PaintingBreakEvent((Painting) this.getBukkitEntity(), PaintingBreakEvent.RemoveCause.valueOf(event.getCause().name())); -+ paintingEvent.setCancelled(event.isCancelled()); -+ this.world.getServer().getPluginManager().callEvent(paintingEvent); -+ } -+ if (event.isCancelled() || (paintingEvent != null && paintingEvent.isCancelled())) { -+ return; -+ } -+ // CraftBukkit end - this.die(); - this.h(); - } --- -1.8.1.2 - diff --git a/CraftBukkit-Patches/0032-Prevent-NPE-in-CraftSign.patch b/CraftBukkit-Patches/0028-Prevent-NPE-in-CraftSign.patch similarity index 96% rename from CraftBukkit-Patches/0032-Prevent-NPE-in-CraftSign.patch rename to CraftBukkit-Patches/0028-Prevent-NPE-in-CraftSign.patch index 360bc52..2b78df9 100644 --- a/CraftBukkit-Patches/0032-Prevent-NPE-in-CraftSign.patch +++ b/CraftBukkit-Patches/0028-Prevent-NPE-in-CraftSign.patch @@ -1,4 +1,4 @@ -From 111f52275cda2c1d1f575424d2a407f6da589556 Mon Sep 17 00:00:00 2001 +From 62299e26a81eebde726d18656f2eebf061d099dd 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/0029-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch b/CraftBukkit-Patches/0029-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch deleted file mode 100644 index 51b5bc4..0000000 --- a/CraftBukkit-Patches/0029-Adds-BUKKIT-3667-Faux-sleepers-wake-up-normally.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 89d5b237ade0d53899f7ef9e99d45bae78e88f21 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/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 7de5b48..9925d1b 100644 ---- a/src/main/java/net/minecraft/server/EntityPlayer.java -+++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -429,7 +429,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - } - - public void a(boolean flag, boolean flag1, boolean flag2) { -- if (this.fauxSleeping && !this.sleeping) return; // CraftBukkit - Can't leave bed if not in one! -+ if (!this.sleeping) return; // CraftBukkit - Can't leave bed if not in one! - - if (this.isSleeping()) { - this.o().getTracker().sendPacketToEntity(this, new Packet18ArmAnimation(this, 3)); --- -1.8.1.2 - diff --git a/CraftBukkit-Patches/0033-Entity-Tracking-Ranges.patch b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch similarity index 96% rename from CraftBukkit-Patches/0033-Entity-Tracking-Ranges.patch rename to CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch index 2444b63..4b9b678 100644 --- a/CraftBukkit-Patches/0033-Entity-Tracking-Ranges.patch +++ b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch @@ -1,4 +1,4 @@ -From 1ee15ef0c0ce6a8016991314892246011fded197 Mon Sep 17 00:00:00 2001 +From 02e93bf58da5b4859c345f9c030d270616ccefa7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Feb 2013 11:58:47 -0500 Subject: [PATCH] Entity Tracking Ranges @@ -24,10 +24,10 @@ index d7efe3e..59586c2 100644 i = this.d; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 2824b17..86d6939 100644 +index 27323a0..c93793f 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -168,4 +168,19 @@ public class SpigotWorldConfig +@@ -147,4 +147,19 @@ public class SpigotWorldConfig miscActivationRange = getInt( "entity-activation-range.misc", miscActivationRange ); log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Mi " + miscActivationRange ); } diff --git a/CraftBukkit-Patches/0034-BungeeCord-Support.patch b/CraftBukkit-Patches/0030-BungeeCord-Support.patch similarity index 96% rename from CraftBukkit-Patches/0034-BungeeCord-Support.patch rename to CraftBukkit-Patches/0030-BungeeCord-Support.patch index 46c53b0..ff75220 100644 --- a/CraftBukkit-Patches/0034-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0030-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From 994bb48cde58d9f7888008c5cc2585b7b5d12cb1 Mon Sep 17 00:00:00 2001 +From 03a26fd523523a2d4e01d9e680d619ac3cb4aec1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -28,7 +28,7 @@ index a945892..e78781e 100644 + // Spigot end } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f748492..e9b4c18 100644 +index b7e327b..30c6503 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -293,7 +293,7 @@ public abstract class PlayerList { @@ -59,10 +59,10 @@ index 1254e63..a4eae65 100644 event.disallow(asyncEvent.getResult(), asyncEvent.getKickMessage()); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8ec84e1..d70c110 100644 +index 7cae665..21141f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1016,6 +1016,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -998,6 +998,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Spigot start private final Spigot spigot = new Spigot() { diff --git a/CraftBukkit-Patches/0035-Limit-Custom-Map-Rendering.patch b/CraftBukkit-Patches/0031-Limit-Custom-Map-Rendering.patch similarity index 98% rename from CraftBukkit-Patches/0035-Limit-Custom-Map-Rendering.patch rename to CraftBukkit-Patches/0031-Limit-Custom-Map-Rendering.patch index 52ee736..c0f84a4 100644 --- a/CraftBukkit-Patches/0035-Limit-Custom-Map-Rendering.patch +++ b/CraftBukkit-Patches/0031-Limit-Custom-Map-Rendering.patch @@ -1,4 +1,4 @@ -From 9b13c53b9a7779891bd61377204d8d743c890839 Mon Sep 17 00:00:00 2001 +From 2f81e3294321a9bfcb00956f75bb54ea5cdfecf5 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/0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch b/CraftBukkit-Patches/0032-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch similarity index 95% rename from CraftBukkit-Patches/0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch rename to CraftBukkit-Patches/0032-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch index 8837563..f3ef09c 100644 --- a/CraftBukkit-Patches/0036-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch +++ b/CraftBukkit-Patches/0032-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch @@ -1,4 +1,4 @@ -From 46f2ad93239b4f6c92b8187f4e6b54c6d19e9aa3 Mon Sep 17 00:00:00 2001 +From 002897e8a239938b0a072e9c89ecc2dc39e88a1c 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/0037-Enable-Improved-ping-sending.patch b/CraftBukkit-Patches/0033-Enable-Improved-ping-sending.patch similarity index 92% rename from CraftBukkit-Patches/0037-Enable-Improved-ping-sending.patch rename to CraftBukkit-Patches/0033-Enable-Improved-ping-sending.patch index 97aa68d..be14b47 100644 --- a/CraftBukkit-Patches/0037-Enable-Improved-ping-sending.patch +++ b/CraftBukkit-Patches/0033-Enable-Improved-ping-sending.patch @@ -1,4 +1,4 @@ -From 40640764e8461fdc97f93fad90d081b1ef8975f1 Mon Sep 17 00:00:00 2001 +From 9b8d56fab138108ef3d328c5fe52cade92b13ce3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Feb 2013 20:45:20 +1100 Subject: [PATCH] Enable Improved ping sending @@ -8,7 +8,7 @@ Subject: [PATCH] Enable Improved ping sending 3 files changed, 18 insertions(+) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 9925d1b..5fa0b05 100644 +index 7de5b48..35a579c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -51,6 +51,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -20,10 +20,10 @@ index 9925d1b..5fa0b05 100644 public EntityPlayer(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager playerinteractmanager) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e9b4c18..c61e959 100644 +index 30c6503..a236c5f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -724,7 +724,23 @@ public abstract class PlayerList { +@@ -717,7 +717,23 @@ public abstract class PlayerList { this.sendAll(new Packet201PlayerInfo(entityplayer.name, true, entityplayer.ping)); } // CraftBukkit end */ diff --git a/CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch b/CraftBukkit-Patches/0034-Prevent-handshake-spam-from-invalid-names.patch similarity index 94% rename from CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch rename to CraftBukkit-Patches/0034-Prevent-handshake-spam-from-invalid-names.patch index d3bedc4..cea82b6 100644 --- a/CraftBukkit-Patches/0038-Prevent-handshake-spam-from-invalid-names.patch +++ b/CraftBukkit-Patches/0034-Prevent-handshake-spam-from-invalid-names.patch @@ -1,4 +1,4 @@ -From ae91a14ab631e23dfaa70e8e5db25ce04e633421 Mon Sep 17 00:00:00 2001 +From 81f21d28642e50e9fae1f7feadbb2882e7820f40 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/CraftBukkit-Patches/0039-Save-entity-counts-for-randomly-spawned-creatures-to.patch b/CraftBukkit-Patches/0035-Save-entity-counts-for-randomly-spawned-creatures-to.patch similarity index 97% rename from CraftBukkit-Patches/0039-Save-entity-counts-for-randomly-spawned-creatures-to.patch rename to CraftBukkit-Patches/0035-Save-entity-counts-for-randomly-spawned-creatures-to.patch index 5f2359a..94fda21 100644 --- a/CraftBukkit-Patches/0039-Save-entity-counts-for-randomly-spawned-creatures-to.patch +++ b/CraftBukkit-Patches/0035-Save-entity-counts-for-randomly-spawned-creatures-to.patch @@ -1,4 +1,4 @@ -From a581070d4f85e5c3983652d21685db6369c2115d Mon Sep 17 00:00:00 2001 +From 9f6ff0b5899268bf52d195f7316c97d0b43ec22b 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 diff --git a/CraftBukkit-Patches/0040-Thread-Naming-and-Tweaks.patch b/CraftBukkit-Patches/0036-Thread-Naming-and-Tweaks.patch similarity index 98% rename from CraftBukkit-Patches/0040-Thread-Naming-and-Tweaks.patch rename to CraftBukkit-Patches/0036-Thread-Naming-and-Tweaks.patch index 73e3fe5..186ac36 100644 --- a/CraftBukkit-Patches/0040-Thread-Naming-and-Tweaks.patch +++ b/CraftBukkit-Patches/0036-Thread-Naming-and-Tweaks.patch @@ -1,4 +1,4 @@ -From 8ebad61b5d641b61b642ad178ee8c9abfde0d53e Mon Sep 17 00:00:00 2001 +From 86bed296f3b5ca333b92ae8d08ca2345b9d9a55f Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:50:27 +1000 Subject: [PATCH] Thread Naming and Tweaks diff --git a/CraftBukkit-Patches/0041-Close-Unloaded-World-s-Save-Files.patch b/CraftBukkit-Patches/0037-Close-Unloaded-World-s-Save-Files.patch similarity index 94% rename from CraftBukkit-Patches/0041-Close-Unloaded-World-s-Save-Files.patch rename to CraftBukkit-Patches/0037-Close-Unloaded-World-s-Save-Files.patch index 2c299c9..ea56dd6 100644 --- a/CraftBukkit-Patches/0041-Close-Unloaded-World-s-Save-Files.patch +++ b/CraftBukkit-Patches/0037-Close-Unloaded-World-s-Save-Files.patch @@ -1,4 +1,4 @@ -From 93a348f809ef9fa14ea5276b433ee93d55e640a9 Mon Sep 17 00:00:00 2001 +From 26cc0b29eadbb08eb1b3c68895e3c3c2ac217d76 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Wed, 27 Mar 2013 01:41:54 +0200 Subject: [PATCH] Close Unloaded World's Save Files @@ -18,7 +18,7 @@ index 900ed68..829f4a3 100644 public static synchronized RegionFile a(File file1, int i, int j) { File file2 = new File(file1, "region"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7f5f3ea..3b58d23 100644 +index 20ba4b7..2e8187e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -37,6 +37,8 @@ import net.minecraft.server.MinecraftServer; @@ -30,7 +30,7 @@ index 7f5f3ea..3b58d23 100644 import net.minecraft.server.ServerNBTManager; import net.minecraft.server.WorldLoaderServer; import net.minecraft.server.WorldManager; -@@ -809,6 +811,30 @@ public final class CraftServer implements Server { +@@ -808,6 +810,30 @@ public final class CraftServer implements Server { worlds.remove(world.getName().toLowerCase()); console.worlds.remove(console.worlds.indexOf(handle)); diff --git a/CraftBukkit-Patches/0042-Optimized-version-of-LocaleLanguage.patch b/CraftBukkit-Patches/0038-Optimized-version-of-LocaleLanguage.patch similarity index 98% rename from CraftBukkit-Patches/0042-Optimized-version-of-LocaleLanguage.patch rename to CraftBukkit-Patches/0038-Optimized-version-of-LocaleLanguage.patch index 57982c8..d6aa5c0 100644 --- a/CraftBukkit-Patches/0042-Optimized-version-of-LocaleLanguage.patch +++ b/CraftBukkit-Patches/0038-Optimized-version-of-LocaleLanguage.patch @@ -1,4 +1,4 @@ -From 72faab2a4b5943d65aa75c3b746b2306c85a32d0 Mon Sep 17 00:00:00 2001 +From da31d0f873c70b080ce64923ce8879ad80c37383 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 8 May 2013 12:09:45 +1000 Subject: [PATCH] Optimized version of LocaleLanguage diff --git a/CraftBukkit-Patches/0043-Improve-next-tick-list-performance-on-chunk-unloads-.patch b/CraftBukkit-Patches/0039-Improve-next-tick-list-performance-on-chunk-unloads-.patch similarity index 99% rename from CraftBukkit-Patches/0043-Improve-next-tick-list-performance-on-chunk-unloads-.patch rename to CraftBukkit-Patches/0039-Improve-next-tick-list-performance-on-chunk-unloads-.patch index 7910ed0..7efa33c 100644 --- a/CraftBukkit-Patches/0043-Improve-next-tick-list-performance-on-chunk-unloads-.patch +++ b/CraftBukkit-Patches/0039-Improve-next-tick-list-performance-on-chunk-unloads-.patch @@ -1,4 +1,4 @@ -From 9531eb712fffefc655e0e254b93d671019da2bdd Mon Sep 17 00:00:00 2001 +From 73fc7751d67136785fe9dd8e37e6bd93e2b70b2a Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Wed, 24 Apr 2013 01:43:33 -0500 Subject: [PATCH] Improve next-tick-list performance on chunk unloads, large diff --git a/CraftBukkit-Patches/0044-Remove-o-Option.patch b/CraftBukkit-Patches/0040-Remove-o-Option.patch similarity index 92% rename from CraftBukkit-Patches/0044-Remove-o-Option.patch rename to CraftBukkit-Patches/0040-Remove-o-Option.patch index 73ac37b..0a1a64e 100644 --- a/CraftBukkit-Patches/0044-Remove-o-Option.patch +++ b/CraftBukkit-Patches/0040-Remove-o-Option.patch @@ -1,4 +1,4 @@ -From 375ef52cac5e16e1375dc9428262dd691dc3c034 Mon Sep 17 00:00:00 2001 +From e5fe9ccaefc62d0e2ec1c6c3f6c86f6d3512a77c Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 19 May 2013 18:29:48 +1000 Subject: [PATCH] Remove -o Option diff --git a/CraftBukkit-Patches/0045-Recipe-Deconstruction.patch b/CraftBukkit-Patches/0041-Recipe-Deconstruction.patch similarity index 97% rename from CraftBukkit-Patches/0045-Recipe-Deconstruction.patch rename to CraftBukkit-Patches/0041-Recipe-Deconstruction.patch index 1bf595b..89ef2d3 100644 --- a/CraftBukkit-Patches/0045-Recipe-Deconstruction.patch +++ b/CraftBukkit-Patches/0041-Recipe-Deconstruction.patch @@ -1,4 +1,4 @@ -From 42746263ae062c4cfe850bdda0cf2118e722e0dc Mon Sep 17 00:00:00 2001 +From aa8e03fbad9d6f5752f6a607cf9f4be005a0a645 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 1 Jun 2013 16:34:38 +1000 Subject: [PATCH] Recipe Deconstruction diff --git a/CraftBukkit-Patches/0046-Fix-Health-Scaling.patch b/CraftBukkit-Patches/0042-Fix-Health-Scaling.patch similarity index 97% rename from CraftBukkit-Patches/0046-Fix-Health-Scaling.patch rename to CraftBukkit-Patches/0042-Fix-Health-Scaling.patch index 2ea9d6a..375005d 100644 --- a/CraftBukkit-Patches/0046-Fix-Health-Scaling.patch +++ b/CraftBukkit-Patches/0042-Fix-Health-Scaling.patch @@ -1,4 +1,4 @@ -From be8e4ab02339079e2041fb9c48e8f209865d374b Mon Sep 17 00:00:00 2001 +From de527072801296213e67bec9e91c49309864229d Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Sun, 2 Jun 2013 14:54:11 +1000 Subject: [PATCH] Fix Health Scaling diff --git a/CraftBukkit-Patches/0047-Fix-EntityShootBowEvent-with-Skeletons.patch b/CraftBukkit-Patches/0043-Fix-EntityShootBowEvent-with-Skeletons.patch similarity index 95% rename from CraftBukkit-Patches/0047-Fix-EntityShootBowEvent-with-Skeletons.patch rename to CraftBukkit-Patches/0043-Fix-EntityShootBowEvent-with-Skeletons.patch index cdae506..1fc7750 100644 --- a/CraftBukkit-Patches/0047-Fix-EntityShootBowEvent-with-Skeletons.patch +++ b/CraftBukkit-Patches/0043-Fix-EntityShootBowEvent-with-Skeletons.patch @@ -1,4 +1,4 @@ -From 55a0a124577e32e4dfb70ae447c9ddd8568075cd Mon Sep 17 00:00:00 2001 +From 7fdad06746184ebc24668b3358d60142108107d5 Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Sun, 2 Jun 2013 15:04:37 +1000 Subject: [PATCH] Fix EntityShootBowEvent with Skeletons diff --git a/CraftBukkit-Patches/0048-Implement-Arrow-API.patch b/CraftBukkit-Patches/0044-Implement-Arrow-API.patch similarity index 93% rename from CraftBukkit-Patches/0048-Implement-Arrow-API.patch rename to CraftBukkit-Patches/0044-Implement-Arrow-API.patch index a168e8a..63a5bd3 100644 --- a/CraftBukkit-Patches/0048-Implement-Arrow-API.patch +++ b/CraftBukkit-Patches/0044-Implement-Arrow-API.patch @@ -1,4 +1,4 @@ -From d255de2f39d158f0e7ecb8039c9f976d03baddcb Mon Sep 17 00:00:00 2001 +From 6a923051c0ba21fb7179bac35c4b4a93562b90bc Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 15:16:05 +1000 Subject: [PATCH] Implement Arrow API diff --git a/CraftBukkit-Patches/0049-Particle-API.patch b/CraftBukkit-Patches/0045-Particle-API.patch similarity index 98% rename from CraftBukkit-Patches/0049-Particle-API.patch rename to CraftBukkit-Patches/0045-Particle-API.patch index e43cd38..275ba46 100644 --- a/CraftBukkit-Patches/0049-Particle-API.patch +++ b/CraftBukkit-Patches/0045-Particle-API.patch @@ -1,4 +1,4 @@ -From b15953996bfacb57262151924528753e9ebd5099 Mon Sep 17 00:00:00 2001 +From da41cfb02d8d4c9c0ef92f3da1d0dba1ad597c86 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 16:14:30 +1000 Subject: [PATCH] Particle API @@ -152,7 +152,7 @@ index edc59b1..0778a66 100644 public Spigot spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d70c110..43e953e 100644 +index 21141f2..feed78e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -266,13 +266,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -191,7 +191,7 @@ index d70c110..43e953e 100644 } public void sendBlockChange(Location loc, Material material, byte data) { -@@ -1021,6 +1024,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1003,6 +1006,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player { { return ( getHandle().playerConnection == null ) ? null : (InetSocketAddress) getHandle().playerConnection.networkManager.getSocket().getRemoteSocketAddress(); } diff --git a/CraftBukkit-Patches/0050-Hopper-Cooldowns.patch b/CraftBukkit-Patches/0046-Hopper-Cooldowns.patch similarity index 96% rename from CraftBukkit-Patches/0050-Hopper-Cooldowns.patch rename to CraftBukkit-Patches/0046-Hopper-Cooldowns.patch index 1219acd..5f12eed 100644 --- a/CraftBukkit-Patches/0050-Hopper-Cooldowns.patch +++ b/CraftBukkit-Patches/0046-Hopper-Cooldowns.patch @@ -1,4 +1,4 @@ -From 36772025aed5f5fdbac6cdee69450f411ee4f462 Mon Sep 17 00:00:00 2001 +From 7325b38754de53b35873781b6c28d4aa9afabff9 Mon Sep 17 00:00:00 2001 From: DerFlash Date: Sun, 2 Jun 2013 16:23:46 +1000 Subject: [PATCH] Hopper Cooldowns @@ -64,10 +64,10 @@ index f6d269d..1f69c7b 100644 iinventory.update(); diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 86d6939..9cc89a3 100644 +index c93793f..75e72e0 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -183,4 +183,13 @@ public class SpigotWorldConfig +@@ -162,4 +162,13 @@ public class SpigotWorldConfig maxTrackingRange = getInt( "entity-tracking-range.other", maxTrackingRange ); log( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Other " + maxTrackingRange ); } diff --git a/CraftBukkit-Patches/0051-Prevent-Shutdown-Hang.patch b/CraftBukkit-Patches/0047-Prevent-Shutdown-Hang.patch similarity index 87% rename from CraftBukkit-Patches/0051-Prevent-Shutdown-Hang.patch rename to CraftBukkit-Patches/0047-Prevent-Shutdown-Hang.patch index c765d0b..c206388 100644 --- a/CraftBukkit-Patches/0051-Prevent-Shutdown-Hang.patch +++ b/CraftBukkit-Patches/0047-Prevent-Shutdown-Hang.patch @@ -1,4 +1,4 @@ -From fdd4ba069b61f6dde73fbf37852dc2e5b99a09ee Mon Sep 17 00:00:00 2001 +From 8a29ec73d104d1095f4e308ca9f544360a36604d Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 11:54:32 +1000 Subject: [PATCH] Prevent Shutdown Hang @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Shutdown Hang Prevents server hanging if players disconnect during the shutdown sequence. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c61e959..8b58243 100644 +index a236c5f..6a58663 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1071,7 +1071,14 @@ public abstract class PlayerList { +@@ -1064,7 +1064,14 @@ public abstract class PlayerList { public void r() { while (!this.players.isEmpty()) { diff --git a/CraftBukkit-Patches/0052-Implement-SpawnerSpawnEvent.patch b/CraftBukkit-Patches/0048-Implement-SpawnerSpawnEvent.patch similarity index 98% rename from CraftBukkit-Patches/0052-Implement-SpawnerSpawnEvent.patch rename to CraftBukkit-Patches/0048-Implement-SpawnerSpawnEvent.patch index 1d77adb..ddd3aba 100644 --- a/CraftBukkit-Patches/0052-Implement-SpawnerSpawnEvent.patch +++ b/CraftBukkit-Patches/0048-Implement-SpawnerSpawnEvent.patch @@ -1,4 +1,4 @@ -From c8083dfc6564728b5f536ca9696add3be6b6c246 Mon Sep 17 00:00:00 2001 +From a3262c25cfe4ed0aba83221d6ead8287fff8b7a7 Mon Sep 17 00:00:00 2001 From: Andy Shulman Date: Mon, 15 Apr 2013 20:06:37 -0500 Subject: [PATCH] Implement SpawnerSpawnEvent. diff --git a/CraftBukkit-Patches/0053-Firework-Meta-Crash-Fix.patch b/CraftBukkit-Patches/0049-Firework-Meta-Crash-Fix.patch similarity index 94% rename from CraftBukkit-Patches/0053-Firework-Meta-Crash-Fix.patch rename to CraftBukkit-Patches/0049-Firework-Meta-Crash-Fix.patch index bc02ec0..75431de 100644 --- a/CraftBukkit-Patches/0053-Firework-Meta-Crash-Fix.patch +++ b/CraftBukkit-Patches/0049-Firework-Meta-Crash-Fix.patch @@ -1,4 +1,4 @@ -From 28e3a04e9578daab00bac557fb9f8ec7246b35af Mon Sep 17 00:00:00 2001 +From 74402ddfe7d7f0a239f0ee650d08fcde49e5ca46 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 15 Jun 2013 21:34:48 +1000 Subject: [PATCH] Firework Meta Crash Fix diff --git a/CraftBukkit-Patches/0054-Do-Not-Search-for-Offline-Players.patch b/CraftBukkit-Patches/0050-Do-Not-Search-for-Offline-Players.patch similarity index 82% rename from CraftBukkit-Patches/0054-Do-Not-Search-for-Offline-Players.patch rename to CraftBukkit-Patches/0050-Do-Not-Search-for-Offline-Players.patch index 4dbd87f..2a31697 100644 --- a/CraftBukkit-Patches/0054-Do-Not-Search-for-Offline-Players.patch +++ b/CraftBukkit-Patches/0050-Do-Not-Search-for-Offline-Players.patch @@ -1,4 +1,4 @@ -From 73b733afa224073a9ea2f64bafcc94db3230e8e0 Mon Sep 17 00:00:00 2001 +From e6ff7cb814f556fd3bac83c60e8a7d89d147e339 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jun 2013 08:20:26 +1000 Subject: [PATCH] Do Not Search for Offline Players @@ -6,10 +6,10 @@ Subject: [PATCH] Do Not Search for Offline Players By default we do not want to search as this leads to massive load times for plugins wanting to do mass data lookups. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3b58d23..71643cc 100644 +index 2e8187e..e7f4b14 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1086,7 +1086,7 @@ public final class CraftServer implements Server { +@@ -1085,7 +1085,7 @@ public final class CraftServer implements Server { } public OfflinePlayer getOfflinePlayer(String name) { From 8cbfcf995d111131ad41e1387d1288247aa57ef8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:00:01 +1000 Subject: [PATCH 15/40] Compiling up to patch 10 --- CraftBukkit-Patches/0001-POM-Changes.patch | 15 +++++++- .../0004-Spigot-Configuration.patch | 12 +++++-- .../0005-Better-Chunk-Tick-Selection.patch | 10 +++--- .../0006-Crop-Growth-Rates.patch | 36 +++++++++---------- .../0010-Merge-tweaks-and-configuration.patch | 22 ++++++------ 5 files changed, 57 insertions(+), 38 deletions(-) diff --git a/CraftBukkit-Patches/0001-POM-Changes.patch b/CraftBukkit-Patches/0001-POM-Changes.patch index a81f7a2..8c9c398 100644 --- a/CraftBukkit-Patches/0001-POM-Changes.patch +++ b/CraftBukkit-Patches/0001-POM-Changes.patch @@ -1,4 +1,4 @@ -From 1f73a2aab42801c0755013847e2e01944aea94ca Mon Sep 17 00:00:00 2001 +From 2dd1e832500d42db77b2e7f905e6d2c7287ed664 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:34:54 +1000 Subject: [PATCH] POM Changes @@ -114,6 +114,19 @@ index 4ead01e..8c9f66b 100644 package +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 6cb50b7..00326c1 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -208,7 +208,7 @@ 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")); +- updater.setEnabled(configuration.getBoolean("auto-updater.enabled")); ++ updater.setEnabled(false); // Spigot + updater.setSuggestChannels(configuration.getBoolean("auto-updater.suggest-channels")); + updater.getOnBroken().addAll(configuration.getStringList("auto-updater.on-broken")); + updater.getOnUpdate().addAll(configuration.getStringList("auto-updater.on-update")); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index f905d17..9304637 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 098eb30..9066d40 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,4 +1,4 @@ -From f1b9716fd4c673cd0074121a4084fcf1cdc3137b Mon Sep 17 00:00:00 2001 +From 0abff71f90ac188f2bc11f81faa224f58179f1c8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 17:35:57 +1000 Subject: [PATCH] Spigot Configuration @@ -142,10 +142,10 @@ index 0000000..bf297bc +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java new file mode 100644 -index 0000000..7d3ec55 +index 0000000..6642e86 --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -0,0 +1,57 @@ +@@ -0,0 +1,63 @@ +package org.spigotmc; + +import java.util.List; @@ -185,6 +185,12 @@ index 0000000..7d3ec55 + return config.getBoolean( "world-settings." + worldName + "." + path, config.getBoolean( "world-settings.default." + path ) ); + } + ++ private double getDouble(String path, double def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return config.getDouble("world-settings." + worldName + "." + path, config.getDouble("world-settings.default." + path ) ); ++ } ++ + private int getInt(String path, int def) + { + config.addDefault( "world-settings.default." + path, def ); diff --git a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch index b254073..9db5f8e 100644 --- a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch +++ b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch @@ -1,4 +1,4 @@ -From 1abb83644de1706b96b50f0497854ecc1f228a12 Mon Sep 17 00:00:00 2001 +From 0f73824e729e0ec4ea129df7f583f6183600a79d Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:56:02 +1000 Subject: [PATCH] Better Chunk Tick Selection @@ -148,18 +148,18 @@ index 49360c1..6c3fcf1 100644 } } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 7d3ec55..4e1bdcf 100644 +index 6642e86..2b77e04 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -54,4 +54,11 @@ public class SpigotWorldConfig +@@ -60,4 +60,11 @@ public class SpigotWorldConfig config.addDefault( "world-settings.default." + path, def ); return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); } + -+ public int chunksPerTick = 750; ++ public int chunksPerTick; + private void chunksPerTick() + { -+ chunksPerTick = getInt( "chunks-per-tick", chunksPerTick ); ++ chunksPerTick = getInt( "chunks-per-tick", 650 ); + log( "Chunks to Grow per Tick: " + chunksPerTick ); + } } diff --git a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch index 9f8cf64..965521f 100644 --- a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch +++ b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch @@ -1,4 +1,4 @@ -From 77958016c76679e58d9475984109f0ec9830ceee Mon Sep 17 00:00:00 2001 +From afa1480e9b476323793c4f04de60114b6c1714c9 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 16:44:14 +1000 Subject: [PATCH] Crop Growth Rates @@ -171,43 +171,43 @@ index bf297bc..38bd7ba 100644 } } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 4e1bdcf..8954c99 100644 +index 2b77e04..fcc2c88 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -61,4 +61,36 @@ public class SpigotWorldConfig - chunksPerTick = getInt( "chunks-per-tick", chunksPerTick ); +@@ -67,4 +67,36 @@ public class SpigotWorldConfig + chunksPerTick = getInt( "chunks-per-tick", 650 ); log( "Chunks to Grow per Tick: " + chunksPerTick ); } + + // Crop growth rates -+ public int cactusModifier = 100; -+ public int caneModifier = 100; -+ public int melonModifier = 100; -+ public int mushroomModifier = 100; -+ public int pumpkinModifier = 100; -+ public int saplingModifier = 100; -+ public int wheatModifier = 100; ++ public int cactusModifier; ++ public int caneModifier; ++ public int melonModifier; ++ public int mushroomModifier; ++ public int pumpkinModifier; ++ public int saplingModifier; ++ public int wheatModifier; + private void growthModifiers() + { -+ cactusModifier = getInt( "growth.cactus-modifier", cactusModifier ); ++ cactusModifier = getInt( "growth.cactus-modifier", 100 ); + log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + -+ caneModifier = getInt( "growth.cane-modifier", caneModifier ); ++ caneModifier = getInt( "growth.cane-modifier", 100 ); + log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + -+ melonModifier = getInt( "growth.melon-modifier", melonModifier ); ++ melonModifier = getInt( "growth.melon-modifier", 100 ); + log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + -+ mushroomModifier = getInt( "growth.mushroom-modifier", mushroomModifier ); ++ mushroomModifier = getInt( "growth.mushroom-modifier", 100 ); + log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + -+ pumpkinModifier = getInt( "growth.pumpkin-modifier", pumpkinModifier ); ++ pumpkinModifier = getInt( "growth.pumpkin-modifier", 100 ); + log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + -+ saplingModifier = getInt( "growth.sapling-modifier", saplingModifier ); ++ saplingModifier = getInt( "growth.sapling-modifier", 100 ); + log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + -+ wheatModifier = getInt( "growth.wheat-modifier", wheatModifier ); ++ wheatModifier = getInt( "growth.wheat-modifier", 100 ); + log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + } } diff --git a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch index bd981d5..7548f69 100644 --- a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch +++ b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch @@ -1,4 +1,4 @@ -From 9ce8fe366d6c6f3fb6d9f358782bd67f7286f869 Mon Sep 17 00:00:00 2001 +From b602c4203e83e437284f7716e1b6535e22a3af2b 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 @@ -6,7 +6,7 @@ Subject: [PATCH] Merge tweaks and configuration This allows the merging of Experience orbs, as well as the configuration of the merge radius of items. Additionally it refactors the merge algorithm to be a better experience for players. diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 0225f53..67567fa 100644 +index 0225f53..048e8fa 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -114,7 +114,10 @@ public class EntityItem extends Entity { @@ -15,7 +15,7 @@ index 0225f53..67567fa 100644 private void g() { - Iterator iterator = this.world.a(EntityItem.class, this.boundingBox.grow(0.5D, 0.0D, 0.5D)).iterator(); + // Spigot start -+ float radius = world.spigotConfig.itemMerge; ++ double radius = world.spigotConfig.itemMerge; + Iterator iterator = this.world.a(EntityItem.class, this.boundingBox.grow(radius, radius, radius)).iterator(); + // Spigot end @@ -41,7 +41,7 @@ index 0225f53..67567fa 100644 } } else { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index afe3e4d..d7e5301 100644 +index afe3e4d..97da2cd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -957,6 +957,23 @@ public abstract class World implements IBlockAccess { @@ -51,7 +51,7 @@ index afe3e4d..d7e5301 100644 + // Spigot start + else if (entity instanceof EntityExperienceOrb) { + EntityExperienceOrb xp = (EntityExperienceOrb) entity; -+ float radius = spigotConfig.expMerge; ++ double radius = spigotConfig.expMerge; + if (radius > 0) { + List entities = this.getEntities(entity, entity.boundingBox.grow(radius, radius, radius)); + for (Entity e : entities) { @@ -69,25 +69,25 @@ index afe3e4d..d7e5301 100644 if (event != null && (event.isCancelled() || entity.dead)) { entity.dead = true; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 8954c99..799bbc8 100644 +index 899f86c..1101361 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -93,4 +93,18 @@ public class SpigotWorldConfig +@@ -99,4 +99,18 @@ public class SpigotWorldConfig wheatModifier = getInt( "growth.wheat-modifier", wheatModifier ); log( "Cactus Growth Modifier: " + cactusModifier + "%" ); } + -+ public float itemMerge = 2.5F; ++ public double itemMerge; + private void itemMerge() + { -+ itemMerge = getFloat( "merge-radius.item", itemMerge ); ++ itemMerge = getDouble("merge-radius.item", 2.5 ); + log( "Item Merge Radius: " + itemMerge ); + } + -+ public float expMerge = 3.0F; ++ public double expMerge; + private void expMerge() + { -+ expMerge = getFloat( "merge-radius.exp", expMerge ); ++ expMerge = getDouble("merge-radius.exp", 3.0 ); + log( "Experience Merge Radius: " + expMerge ); + } } From dce45d252cc6a1a14f40e3c2f3613fa9903cbfc7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:14:11 +1000 Subject: [PATCH 16/40] Redo longhash tweaks --- .../0010-Merge-tweaks-and-configuration.patch | 6 +- .../0011-LongHash-Tweaks.patch | 198 ++++++++++++------ 2 files changed, 135 insertions(+), 69 deletions(-) diff --git a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch index 7548f69..39e88c1 100644 --- a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch +++ b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch @@ -1,4 +1,4 @@ -From b602c4203e83e437284f7716e1b6535e22a3af2b Mon Sep 17 00:00:00 2001 +From b7bcbfba58901386aae82eb079dafc7d2bb6f17f 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 @@ -69,11 +69,11 @@ index afe3e4d..97da2cd 100644 if (event != null && (event.isCancelled() || entity.dead)) { entity.dead = true; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 899f86c..1101361 100644 +index fcc2c88..58406e5 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -99,4 +99,18 @@ public class SpigotWorldConfig - wheatModifier = getInt( "growth.wheat-modifier", wheatModifier ); + wheatModifier = getInt( "growth.wheat-modifier", 100 ); log( "Cactus Growth Modifier: " + cactusModifier + "%" ); } + diff --git a/CraftBukkit-Patches/0011-LongHash-Tweaks.patch b/CraftBukkit-Patches/0011-LongHash-Tweaks.patch index 970760a..97bcea1 100644 --- a/CraftBukkit-Patches/0011-LongHash-Tweaks.patch +++ b/CraftBukkit-Patches/0011-LongHash-Tweaks.patch @@ -1,119 +1,107 @@ -From a11aa1e2aecca3e245bb003b7caf9e4287e14271 Mon Sep 17 00:00:00 2001 +From aa15e3095f30c11c90f034e2b1b9ebbe08337c56 Mon Sep 17 00:00:00 2001 From: md_5 -Date: Sat, 23 Mar 2013 09:29:43 +1100 -Subject: [PATCH] LongHash Tweaks. +Date: Fri, 21 Jun 2013 17:13:47 +1000 +Subject: [PATCH] LongHash Tweaks -This commit adds a flat array based cache to the LongHash(Set/Map) classes leading to excellent efficiency for servers where most activity is centered around the origin (0,0) -diff --git a/src/main/java/org/bukkit/craftbukkit/util/FlatMap.java b/src/main/java/org/bukkit/craftbukkit/util/FlatMap.java -new file mode 100644 -index 0000000..e8a7725 ---- /dev/null -+++ b/src/main/java/org/bukkit/craftbukkit/util/FlatMap.java -@@ -0,0 +1,34 @@ -+package org.bukkit.craftbukkit.util; -+ -+public class FlatMap { -+ -+ private static final int FLAT_LOOKUP_SIZE = 512; -+ private final Object[][] flatLookup = new Object[FLAT_LOOKUP_SIZE * 2][FLAT_LOOKUP_SIZE * 2]; -+ -+ public void put(long msw, long lsw, V value) { -+ long acx = Math.abs(msw); -+ long acz = Math.abs(lsw); -+ if (acx < FLAT_LOOKUP_SIZE && acz < FLAT_LOOKUP_SIZE) { -+ flatLookup[(int) (msw + FLAT_LOOKUP_SIZE)][(int) (lsw + FLAT_LOOKUP_SIZE)] = value; -+ } -+ } -+ -+ public void put(long key, V value) { -+ put(LongHash.msw(key), LongHash.lsw(key), value); -+ -+ } -+ -+ public V get(long msw, long lsw) { -+ long acx = Math.abs(msw); -+ long acz = Math.abs(lsw); -+ if (acx < FLAT_LOOKUP_SIZE && acz < FLAT_LOOKUP_SIZE) { -+ return (V) flatLookup[(int) (msw + FLAT_LOOKUP_SIZE)][(int) (lsw + FLAT_LOOKUP_SIZE)]; -+ } else { -+ return null; -+ } -+ } -+ -+ public V get(long key) { -+ return get(LongHash.msw(key), LongHash.lsw(key)); -+ } -+} diff --git a/src/main/java/org/bukkit/craftbukkit/util/LongHashSet.java b/src/main/java/org/bukkit/craftbukkit/util/LongHashSet.java -index 22c96c5..331d570 100644 +index 22c96c5..7c3005e 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/LongHashSet.java +++ b/src/main/java/org/bukkit/craftbukkit/util/LongHashSet.java -@@ -31,6 +31,8 @@ public class LongHashSet { +@@ -31,6 +31,7 @@ public class LongHashSet { private int elements; private long[] values; private int modCount; -+ private static final Object PRESENT = new Object(); -+ private final FlatMap flat = new FlatMap(); ++ private org.spigotmc.FlatMap flat = new org.spigotmc.FlatMap(); // Spigot public LongHashSet() { this(INITIAL_SIZE); -@@ -56,10 +58,12 @@ public class LongHashSet { +@@ -56,10 +57,22 @@ public class LongHashSet { } public boolean contains(int msw, int lsw) { -+ if (flat.get(msw, lsw) != null) return true; // Spigot ++ // Spigot start ++ if ( flat.contains( msw, lsw ) ) ++ { ++ return true; ++ } ++ // Spigot end return contains(LongHash.toLong(msw, lsw)); } public boolean contains(long value) { -+ if (flat.get(value) != null) return true; // Spigot ++ // Spigot start ++ if ( flat.contains( value ) ) ++ { ++ return true; ++ } ++ // Spigot end int hash = hash(value); int index = (hash & 0x7FFFFFFF) % values.length; int offset = 1; -@@ -82,6 +86,7 @@ public class LongHashSet { +@@ -82,6 +95,7 @@ public class LongHashSet { } public boolean add(long value) { -+ flat.put(value, PRESENT); // Spigot ++ flat.put( value, Boolean.TRUE ); // Spigot int hash = hash(value); int index = (hash & 0x7FFFFFFF) % values.length; int offset = 1; -@@ -125,10 +130,11 @@ public class LongHashSet { +@@ -125,10 +139,18 @@ public class LongHashSet { } public void remove(int msw, int lsw) { -+ flat.put(msw, lsw, null); // Spigot - remove(LongHash.toLong(msw, lsw)); +- remove(LongHash.toLong(msw, lsw)); ++ // Spigot start ++ flat.remove(msw, lsw); ++ remove0(LongHash.toLong(msw, lsw)); } -- public boolean remove(long value) { -+ private boolean remove(long value) { // Spigot + public boolean remove(long value) { ++ flat.remove(value); ++ return remove0(value); ++ } ++ ++ private boolean remove0(long value) { ++ // Spigot end int hash = hash(value); int index = (hash & 0x7FFFFFFF) % values.length; int offset = 1; +@@ -161,6 +183,7 @@ public class LongHashSet { + + freeEntries = values.length; + modCount++; ++ flat = new org.spigotmc.FlatMap(); + } + + public long[] toArray() { diff --git a/src/main/java/org/bukkit/craftbukkit/util/LongObjectHashMap.java b/src/main/java/org/bukkit/craftbukkit/util/LongObjectHashMap.java -index 01861cc..dbd33fa 100644 +index 01861cc..08b543b 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/LongObjectHashMap.java +++ b/src/main/java/org/bukkit/craftbukkit/util/LongObjectHashMap.java @@ -28,6 +28,7 @@ public class LongObjectHashMap implements Cloneable, Serializable { private transient V[][] values; private transient int modCount; private transient int size; -+ private final FlatMap flat = new FlatMap(); // Spigot ++ private transient org.spigotmc.FlatMap flat = new org.spigotmc.FlatMap(); // Spigot public LongObjectHashMap() { initialize(); -@@ -61,6 +62,8 @@ public class LongObjectHashMap implements Cloneable, Serializable { +@@ -61,6 +62,13 @@ public class LongObjectHashMap implements Cloneable, Serializable { } public V get(long key) { -+ V val = flat.get(key); // Spigot -+ if (val != null) return val; // Spigot ++ // Spigot start ++ V val = flat.get( key ); ++ if ( val != null ) ++ { ++ return val; ++ } ++ // Spigot end int index = (int) (keyIndex(key) & (BUCKET_SIZE - 1)); long[] inner = keys[index]; if (inner == null) return null; -@@ -78,6 +81,7 @@ public class LongObjectHashMap implements Cloneable, Serializable { +@@ -78,6 +86,7 @@ public class LongObjectHashMap implements Cloneable, Serializable { } public V put(long key, V value) { @@ -121,14 +109,92 @@ index 01861cc..dbd33fa 100644 int index = (int) (keyIndex(key) & (BUCKET_SIZE - 1)); long[] innerKeys = keys[index]; V[] innerValues = values[index]; -@@ -124,6 +128,7 @@ public class LongObjectHashMap implements Cloneable, Serializable { +@@ -124,6 +133,7 @@ public class LongObjectHashMap implements Cloneable, Serializable { } public V remove(long key) { -+ flat.put(key, null); // Spigot ++ flat.remove(key); // Spigot int index = (int) (keyIndex(key) & (BUCKET_SIZE - 1)); long[] inner = keys[index]; if (inner == null) { +@@ -174,6 +184,7 @@ public class LongObjectHashMap implements Cloneable, Serializable { + size = 0; + Arrays.fill(keys, null); + Arrays.fill(values, null); ++ flat = new org.spigotmc.FlatMap(); + } + + public Set keySet() { +diff --git a/src/main/java/org/spigotmc/FlatMap.java b/src/main/java/org/spigotmc/FlatMap.java +new file mode 100644 +index 0000000..9416f6e +--- /dev/null ++++ b/src/main/java/org/spigotmc/FlatMap.java +@@ -0,0 +1,64 @@ ++package org.spigotmc; ++ ++import org.bukkit.craftbukkit.util.LongHash; ++ ++public class FlatMap ++{ ++ ++ private static final int FLAT_LOOKUP_SIZE = 512; ++ private final Object[][] flatLookup = new Object[ FLAT_LOOKUP_SIZE * 2 ][ FLAT_LOOKUP_SIZE * 2 ]; ++ ++ public void put(long msw, long lsw, V value) ++ { ++ long acx = Math.abs( msw ); ++ long acz = Math.abs( lsw ); ++ if ( acx < FLAT_LOOKUP_SIZE && acz < FLAT_LOOKUP_SIZE ) ++ { ++ flatLookup[(int) ( msw + FLAT_LOOKUP_SIZE )][(int) ( lsw + FLAT_LOOKUP_SIZE )] = value; ++ } ++ } ++ ++ public void put(long key, V value) ++ { ++ put( LongHash.msw( key ), LongHash.lsw( key ), value ); ++ ++ } ++ ++ public void remove(long key) ++ { ++ put( key, null ); ++ } ++ ++ public void remove(long msw, long lsw) ++ { ++ put( msw, lsw, null ); ++ } ++ ++ public boolean contains(long msw, long lsw) ++ { ++ return get( msw, lsw ) != null; ++ } ++ ++ public boolean contains(long key) ++ { ++ return get( key ) != null; ++ } ++ ++ public V get(long msw, long lsw) ++ { ++ long acx = Math.abs( msw ); ++ long acz = Math.abs( lsw ); ++ if ( acx < FLAT_LOOKUP_SIZE && acz < FLAT_LOOKUP_SIZE ) ++ { ++ return (V) flatLookup[(int) ( msw + FLAT_LOOKUP_SIZE )][(int) ( lsw + FLAT_LOOKUP_SIZE )]; ++ } else ++ { ++ return null; ++ } ++ } ++ ++ public V get(long key) ++ { ++ return get( LongHash.msw( key ), LongHash.lsw( key ) ); ++ } ++} -- 1.8.1.2 From 20e0c70bd864a168c3a22d18905930107a4303a7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:30:13 +1000 Subject: [PATCH 17/40] More patches --- .../0006-Crop-Growth-Rates.patch | 43 +------- .../0009-Proxy-IP-Filter.patch | 14 +-- CraftBukkit-Patches/0013-View-Distance.patch | 8 +- CraftBukkit-Patches/0019-Orebfuscator.patch | 6 +- ...-Spawning-Relative-to-View-Distance.patch} | 100 +++++++++--------- .../0022-Entity-Activation-Range.patch | 8 +- CraftBukkit-Patches/0023-Metrics.patch | 8 +- .../0024-Watchdog-Thread.patch | 6 +- CraftBukkit-Patches/0025-Netty.patch | 12 +-- .../0029-Entity-Tracking-Ranges.patch | 6 +- .../0030-BungeeCord-Support.patch | 6 +- .../0046-Hopper-Cooldowns.patch | 6 +- 12 files changed, 92 insertions(+), 131 deletions(-) rename CraftBukkit-Patches/{0020-Only-count-entities-in-chunks-being-processed-for-th.patch => 0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch} (52%) diff --git a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch index 965521f..ab0ad05 100644 --- a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch +++ b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch @@ -1,6 +1,6 @@ -From afa1480e9b476323793c4f04de60114b6c1714c9 Mon Sep 17 00:00:00 2001 +From 1dd2846a5baeca5b402c2ed8c154eb305670189d Mon Sep 17 00:00:00 2001 From: md_5 -Date: Fri, 21 Jun 2013 16:44:14 +1000 +Date: Fri, 21 Jun 2013 17:17:20 +1000 Subject: [PATCH] Crop Growth Rates @@ -131,45 +131,6 @@ index 8339a35..c7e2344 100644 int l = world.getData(i, j, k); if (l < 7) { -diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index bf297bc..38bd7ba 100644 ---- a/src/main/java/org/spigotmc/SpigotConfig.java -+++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -6,7 +6,6 @@ import java.io.IOException; - import java.lang.reflect.InvocationTargetException; - import java.lang.reflect.Method; - import java.lang.reflect.Modifier; --import java.util.List; - import java.util.logging.Level; - import org.bukkit.Bukkit; - import org.bukkit.configuration.file.YamlConfiguration; -@@ -84,15 +83,21 @@ public class SpigotConfig - return config.getInt( path, config.getInt( path ) ); - } - -- private List getList(String path, T def) -+ private static String getString(String path, String def) - { - config.addDefault( path, def ); -- return (List) config.getList( path, config.getList( path ) ); -+ return config.getString( path, config.getString( path ) ); - } - -- private static String getString(String path, String def) -+ public static boolean tabComplete = true; -+ private static void tabComplete() - { -- config.addDefault( path, def ); -- return config.getString( path, config.getString( path ) ); -+ tabComplete = getBoolean( "commands.tab-complete", tabComplete ); -+ } -+ -+ public static boolean logCommands = true; -+ private static void logCommands() -+ { -+ logCommands = getBoolean( "commands.log", logCommands ); - } - } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java index 2b77e04..fcc2c88 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java diff --git a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch index 5227af6..ffab132 100644 --- a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch +++ b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch @@ -1,4 +1,4 @@ -From 6a5eaf4b83d8b0603b9088518922f4f19ac9f053 Mon Sep 17 00:00:00 2001 +From 7b5dea06abdd8821b9eae340a8168cfb47ef43d8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:22:07 +1000 Subject: [PATCH] Proxy IP Filter @@ -67,18 +67,18 @@ index 0000000..55d8d12 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 38bd7ba..d647943 100644 +index bf297bc..342d883 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -100,4 +100,10 @@ public class SpigotConfig - { - logCommands = getBoolean( "commands.log", logCommands ); +@@ -95,4 +95,10 @@ public class SpigotConfig + config.addDefault( path, def ); + return config.getString( path, config.getString( path ) ); } + -+ public static boolean preventProxies = false; ++ public static boolean preventProxies; + private static void preventProxies() + { -+ preventProxies = getBoolean( "settings.prevent-proxies", preventProxies ); ++ preventProxies = getBoolean( "settings.prevent-proxies", false ); + } } -- diff --git a/CraftBukkit-Patches/0013-View-Distance.patch b/CraftBukkit-Patches/0013-View-Distance.patch index 1aac7ad..03bd7ee 100644 --- a/CraftBukkit-Patches/0013-View-Distance.patch +++ b/CraftBukkit-Patches/0013-View-Distance.patch @@ -1,4 +1,4 @@ -From 16ce161417a943918e27f36561a1f611e2cc9f78 Mon Sep 17 00:00:00 2001 +From ee35f397d1f01892ef579716909a6a61f8e55937 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:52:41 +1100 Subject: [PATCH] View Distance @@ -32,11 +32,11 @@ index 6c3fcf1..614a17f 100644 this.entitiesById = new IntHashMap(); } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 799bbc8..0e3f855 100644 +index 58406e5..c56b3e0 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -107,4 +107,11 @@ public class SpigotWorldConfig - expMerge = getFloat( "merge-radius.exp", expMerge ); +@@ -113,4 +113,11 @@ public class SpigotWorldConfig + expMerge = getDouble("merge-radius.exp", 3.0 ); log( "Experience Merge Radius: " + expMerge ); } + diff --git a/CraftBukkit-Patches/0019-Orebfuscator.patch b/CraftBukkit-Patches/0019-Orebfuscator.patch index 69a02eb..748a288 100644 --- a/CraftBukkit-Patches/0019-Orebfuscator.patch +++ b/CraftBukkit-Patches/0019-Orebfuscator.patch @@ -1,4 +1,4 @@ -From 845b5bc50a2e34500f94692cd0cb1a324b3ae329 Mon Sep 17 00:00:00 2001 +From ce0f33c8af5d3b5fcb21e1dff0808d39c4b3b180 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator @@ -316,7 +316,7 @@ index 0000000..74ee741 + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 0e3f855..52e060a 100644 +index c56b3e0..5e1cfa9 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -1,5 +1,6 @@ @@ -326,7 +326,7 @@ index 0e3f855..52e060a 100644 import java.util.List; import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; -@@ -114,4 +115,25 @@ public class SpigotWorldConfig +@@ -120,4 +121,25 @@ public class SpigotWorldConfig viewDistance = getInt( "view-distance", Bukkit.getViewDistance() ); log( "View Distance: " + viewDistance ); } diff --git a/CraftBukkit-Patches/0020-Only-count-entities-in-chunks-being-processed-for-th.patch b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch similarity index 52% rename from CraftBukkit-Patches/0020-Only-count-entities-in-chunks-being-processed-for-th.patch rename to CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch index cfa9300..698c6fe 100644 --- a/CraftBukkit-Patches/0020-Only-count-entities-in-chunks-being-processed-for-th.patch +++ b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch @@ -1,36 +1,33 @@ -From e5c58163b2c1be562f43b9b90132400d7af1b507 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 - wave. Fixes mob spawn issues. +From 944e72c8c821cfea28fb2d0f49262f209ab99bec Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Fri, 21 Jun 2013 17:29:54 +1000 +Subject: [PATCH] Fix Mob Spawning Relative to View Distance diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 056100f..3529074 100644 +index 056100f..c17ad8b 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -16,6 +16,7 @@ public final class SpawnerCreature { - - private static LongObjectHashMap b = new LongObjectHashMap(); // CraftBukkit - HashMap -> LongObjectHashMap - protected static final Class[] a = new Class[] { EntitySpider.class, EntityZombie.class, EntitySkeleton.class}; -+ private static byte spawnRadius = 0; // Spigot - - protected static ChunkPosition getRandomPosition(World world, int i, int j) { - Chunk chunk = world.getChunkAt(i, j); -@@ -26,6 +27,26 @@ public final class SpawnerCreature { +@@ -26,6 +26,32 @@ public final class SpawnerCreature { return new ChunkPosition(k, i1, l); } + // Spigot start - get entity count only from chunks being processed in b -+ public static final int getEntityCount(WorldServer server, Class oClass) { ++ private static int getEntityCount(WorldServer server, Class oClass) ++ { + int i = 0; -+ for (Long coord : b.keySet()) { -+ int x = LongHash.msw(coord); -+ int z = LongHash.lsw(coord); -+ if (!server.chunkProviderServer.unloadQueue.contains(x,z) && server.isChunkLoaded(x, z)) { -+ for (List entitySlice : server.getChunkAt(x, z).entitySlices) { -+ for (Entity entity : entitySlice) { -+ if (oClass.isAssignableFrom(entity.getClass())) { ++ for ( Long coord : b.keySet() ) ++ { ++ int x = LongHash.msw( coord ); ++ int z = LongHash.lsw( coord ); ++ if ( !server.chunkProviderServer.unloadQueue.contains( x, z ) && server.isChunkLoaded( x, z ) ) ++ { ++ for ( List entitySlice : server.getChunkAt( x, z ).entitySlices ) ++ { ++ for ( Entity entity : entitySlice ) ++ { ++ if ( oClass.isAssignableFrom( entity.getClass() ) ) ++ { + ++i; + } + } @@ -44,33 +41,19 @@ index 056100f..3529074 100644 public static final int spawnEntities(WorldServer worldserver, boolean flag, boolean flag1, boolean flag2) { if (!flag && !flag1) { return 0; -@@ -34,13 +55,24 @@ public final class SpawnerCreature { - - int i; - int j; -+ // Spigot start - limit radius to spawn distance (chunks aren't loaded) -+ if (spawnRadius == 0) { -+ spawnRadius = (byte) worldserver.getWorld().mobSpawnRange; -+ if (spawnRadius > (byte) worldserver.getServer().getViewDistance()) { -+ spawnRadius = (byte) worldserver.getServer().getViewDistance(); -+ } -+ if (spawnRadius > 8) { -+ spawnRadius = 8; -+ } -+ } -+ // Spigot end - - for (i = 0; i < worldserver.players.size(); ++i) { - EntityHuman entityhuman = (EntityHuman) worldserver.players.get(i); - int k = MathHelper.floor(entityhuman.locX / 16.0D); +@@ -41,6 +67,11 @@ public final class SpawnerCreature { j = MathHelper.floor(entityhuman.locZ / 16.0D); -- byte b0 = 8; -+ byte b0 = spawnRadius; // Spigot - replace 8 with view distance constrained value + byte b0 = 8; ++ // Spigot Start ++ b0 = worldserver.spigotConfig.mobSpawnRange; ++ b0 = ( b0 > worldserver.spigotConfig.viewDistance ) ? (byte) worldserver.spigotConfig.viewDistance : b0; ++ b0 = ( b0 > 8 ) ? 8 : b0; ++ // Spigot End for (int l = -b0; l <= b0; ++l) { for (int i1 = -b0; i1 <= b0; ++i1) { -@@ -88,13 +120,15 @@ public final class SpawnerCreature { +@@ -88,13 +119,15 @@ public final class SpawnerCreature { if (limit == 0) { continue; } @@ -78,29 +61,46 @@ index 056100f..3529074 100644 // CraftBukkit end - if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2) && worldserver.a(enumcreaturetype.a()) <= limit * b.size() / 256) { // CraftBukkit - use per-world limits -+ if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2) && (mobcnt = getEntityCount(worldserver, enumcreaturetype.a())) <= limit * b.size() / 256) { // CraftBukkit - use per-world limits and use all loaded chunks ++ if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2) && (mobcnt = getEntityCount(worldserver, enumcreaturetype.a())) <= limit * b.size() / 256) { // Spigot - use per-world limits and use all loaded chunks Iterator iterator = b.keySet().iterator(); -+ int moblimit = (limit * b.size() / 256) - mobcnt + 1; // CraftBukkit - up to 1 more than limit ++ int moblimit = (limit * b.size() / 256) - mobcnt + 1; // Spigot - up to 1 more than limit label110: - while (iterator.hasNext()) { + while (iterator.hasNext() && (moblimit > 0)) { // Spigot - while more allowed // CraftBukkit start long key = ((Long) iterator.next()).longValue(); -@@ -158,6 +192,12 @@ public final class SpawnerCreature { +@@ -158,6 +191,13 @@ public final class SpawnerCreature { a(entityliving, worldserver, f, f1, f2); worldserver.addEntity(entityliving, SpawnReason.NATURAL); // CraftBukkit end + // Spigot start -+ moblimit--; -+ if (moblimit <= 0) { // If we're past limit, stop spawn ++ if ( --moblimit <= 0 ) ++ { ++ // If we're past limit, stop spawn + continue label110; + } + // Spigot end if (j2 >= entityliving.by()) { continue label110; } +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 5e1cfa9..e807ec8 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -142,4 +142,11 @@ public class SpigotWorldConfig + + antiXrayInstance = new AntiXray( this ); + } ++ ++ public byte mobSpawnRange; ++ private void mobSpawnRange() ++ { ++ mobSpawnRange = getByte( "mob-spawn-range", 4 ); ++ log( "Mob Spawn Range: " + mobSpawnRange ); ++ } + } -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch index 74a9512..95b4bb7 100644 --- a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From 54acbfac602e85d68bada6c0815e58fd77c3ed98 Mon Sep 17 00:00:00 2001 +From 055bea092702d1912c8bd99415f3b1d91046672e Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -118,7 +118,7 @@ index 58a4acb..35f3fea 100644 public EntityLiving(World world) { super(world); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d4d8f04..435ec52 100644 +index 3a6a63d..5866abb 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1277,6 +1277,7 @@ public abstract class World implements IBlockAccess { @@ -462,10 +462,10 @@ index 0000000..93ce20e + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 52e060a..27323a0 100644 +index 5e1cfa9..31f4c39 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -136,4 +136,15 @@ public class SpigotWorldConfig +@@ -142,4 +142,15 @@ public class SpigotWorldConfig antiXrayInstance = new AntiXray( this ); } diff --git a/CraftBukkit-Patches/0023-Metrics.patch b/CraftBukkit-Patches/0023-Metrics.patch index f542621..0622af4 100644 --- a/CraftBukkit-Patches/0023-Metrics.patch +++ b/CraftBukkit-Patches/0023-Metrics.patch @@ -1,4 +1,4 @@ -From 6d588b92bf8282f25ed30e7660a338f160a500bc Mon Sep 17 00:00:00 2001 +From de751bfcb848c186b0d2899a659ad39404b4ef81 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 08:58:35 +1100 Subject: [PATCH] Metrics @@ -657,10 +657,10 @@ index 0000000..f1690a2 +} \ No newline at end of file diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index d647943..fde9250 100644 +index e84372d..8711c7a 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -29,6 +29,7 @@ public class SpigotConfig +@@ -30,6 +30,7 @@ public class SpigotConfig static YamlConfiguration config; static int version; /*========================================================================*/ @@ -668,7 +668,7 @@ index d647943..fde9250 100644 public static void init() { -@@ -38,6 +39,18 @@ public class SpigotConfig +@@ -39,6 +40,18 @@ public class SpigotConfig version = getInt( "config-version", 1 ); readConfig( SpigotConfig.class, null ); diff --git a/CraftBukkit-Patches/0024-Watchdog-Thread.patch b/CraftBukkit-Patches/0024-Watchdog-Thread.patch index 99df003..8a70121 100644 --- a/CraftBukkit-Patches/0024-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0024-Watchdog-Thread.patch @@ -1,4 +1,4 @@ -From c6b9aaf6ba62817a2cff96441552a2df4b91601a Mon Sep 17 00:00:00 2001 +From a8d2f288d11999d0de83c613c73e5455ea3156c7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 12:33:20 +1100 Subject: [PATCH] Watchdog Thread. @@ -142,10 +142,10 @@ index 0000000..a5c4549 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index fde9250..2fe3a5d 100644 +index 8711c7a..6e8bae8 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -119,4 +119,15 @@ public class SpigotConfig +@@ -114,4 +114,15 @@ public class SpigotConfig { preventProxies = getBoolean( "settings.prevent-proxies", preventProxies ); } diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index 6c3ab61..c587d1b 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,4 +1,4 @@ -From bfb9a7a900a658c78665a0397cd79789ad535056 Mon Sep 17 00:00:00 2001 +From 3a9c5ddf9b383449f2de17e827cccf88fe430f7d Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:47:32 +1000 Subject: [PATCH] Netty @@ -210,7 +210,7 @@ index 17cfacc..a945892 100644 this.b = true; } catch (Exception exception) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6cb50b7..20ba4b7 100644 +index 00326c1..c18e5e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1366,4 +1366,20 @@ public final class CraftServer implements Server { @@ -377,22 +377,22 @@ index 0000000..386c2f8 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 2fe3a5d..90d3193 100644 +index 6e8bae8..5686c41 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -6,6 +6,11 @@ import java.io.IOException; +@@ -6,7 +6,11 @@ import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; -+import java.util.List; + import java.util.List; +import java.util.Map; import java.util.logging.Level; import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; -@@ -130,4 +135,44 @@ public class SpigotConfig +@@ -125,4 +129,44 @@ public class SpigotConfig restartScript = getString( "settings.restart-script", restartScript ); WatchdogThread.doStart( timeoutTime, restartOnCrash ); } diff --git a/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch index 4b9b678..2df6c00 100644 --- a/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch +++ b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch @@ -1,4 +1,4 @@ -From 02e93bf58da5b4859c345f9c030d270616ccefa7 Mon Sep 17 00:00:00 2001 +From fd0be11a5ce06767e30b2d3f424712d24edc28f7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Feb 2013 11:58:47 -0500 Subject: [PATCH] Entity Tracking Ranges @@ -24,10 +24,10 @@ index d7efe3e..59586c2 100644 i = this.d; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 27323a0..c93793f 100644 +index 31f4c39..8ae36fe 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -147,4 +147,19 @@ public class SpigotWorldConfig +@@ -153,4 +153,19 @@ public class SpigotWorldConfig miscActivationRange = getInt( "entity-activation-range.misc", miscActivationRange ); log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Mi " + miscActivationRange ); } diff --git a/CraftBukkit-Patches/0030-BungeeCord-Support.patch b/CraftBukkit-Patches/0030-BungeeCord-Support.patch index ff75220..f1221a2 100644 --- a/CraftBukkit-Patches/0030-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0030-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From 03a26fd523523a2d4e01d9e680d619ac3cb4aec1 Mon Sep 17 00:00:00 2001 +From c2e3bc388c9aa440a90d0fff23131900c434a23c Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -75,7 +75,7 @@ index 7cae665..21141f2 100644 public Spigot spigot() diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 90d3193..4a80929 100644 +index 5686c41..952c0ab 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -7,6 +7,7 @@ import java.lang.reflect.InvocationTargetException; @@ -86,7 +86,7 @@ index 90d3193..4a80929 100644 import java.util.Collections; import java.util.HashMap; import java.util.List; -@@ -175,4 +176,14 @@ public class SpigotConfig +@@ -169,4 +170,14 @@ public class SpigotConfig this.listeners.add( new Listener( host, port, netty, connectionThrottle ) ); } } diff --git a/CraftBukkit-Patches/0046-Hopper-Cooldowns.patch b/CraftBukkit-Patches/0046-Hopper-Cooldowns.patch index 5f12eed..70366c6 100644 --- a/CraftBukkit-Patches/0046-Hopper-Cooldowns.patch +++ b/CraftBukkit-Patches/0046-Hopper-Cooldowns.patch @@ -1,4 +1,4 @@ -From 7325b38754de53b35873781b6c28d4aa9afabff9 Mon Sep 17 00:00:00 2001 +From 862436c501725e9bc306c4d7f931daec482a3a4d Mon Sep 17 00:00:00 2001 From: DerFlash Date: Sun, 2 Jun 2013 16:23:46 +1000 Subject: [PATCH] Hopper Cooldowns @@ -64,10 +64,10 @@ index f6d269d..1f69c7b 100644 iinventory.update(); diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index c93793f..75e72e0 100644 +index 8ae36fe..aea0b37 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -162,4 +162,13 @@ public class SpigotWorldConfig +@@ -168,4 +168,13 @@ public class SpigotWorldConfig maxTrackingRange = getInt( "entity-tracking-range.other", maxTrackingRange ); log( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Other " + maxTrackingRange ); } From 8a883922a86d34c9d9ab9f89e55f1c91464b123d Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:35:08 +1000 Subject: [PATCH 18/40] Merge the two spawn calculation fixes --- ...b-Spawning-Relative-to-View-Distance.patch | 69 ++++++++++++---- .../0022-Entity-Activation-Range.patch | 10 +-- .../0024-Watchdog-Thread.patch | 6 +- .../0029-Entity-Tracking-Ranges.patch | 6 +- ...ts-for-randomly-spawned-creatures-to.patch | 79 ------------------- ...ch => 0035-Thread-Naming-and-Tweaks.patch} | 2 +- ...6-Close-Unloaded-World-s-Save-Files.patch} | 4 +- ...Optimized-version-of-LocaleLanguage.patch} | 2 +- ...-list-performance-on-chunk-unloads-.patch} | 2 +- ...ption.patch => 0039-Remove-o-Option.patch} | 2 +- ...patch => 0040-Recipe-Deconstruction.patch} | 2 +- ...ng.patch => 0041-Fix-Health-Scaling.patch} | 2 +- ...-EntityShootBowEvent-with-Skeletons.patch} | 2 +- ...I.patch => 0043-Implement-Arrow-API.patch} | 2 +- ...icle-API.patch => 0044-Particle-API.patch} | 2 +- ...owns.patch => 0045-Hopper-Cooldowns.patch} | 6 +- ...patch => 0046-Prevent-Shutdown-Hang.patch} | 2 +- ...=> 0047-Implement-SpawnerSpawnEvent.patch} | 2 +- ...tch => 0048-Firework-Meta-Crash-Fix.patch} | 2 +- ...9-Do-Not-Search-for-Offline-Players.patch} | 4 +- 20 files changed, 82 insertions(+), 126 deletions(-) delete mode 100644 CraftBukkit-Patches/0035-Save-entity-counts-for-randomly-spawned-creatures-to.patch rename CraftBukkit-Patches/{0036-Thread-Naming-and-Tweaks.patch => 0035-Thread-Naming-and-Tweaks.patch} (98%) rename CraftBukkit-Patches/{0037-Close-Unloaded-World-s-Save-Files.patch => 0036-Close-Unloaded-World-s-Save-Files.patch} (96%) rename CraftBukkit-Patches/{0038-Optimized-version-of-LocaleLanguage.patch => 0037-Optimized-version-of-LocaleLanguage.patch} (98%) rename CraftBukkit-Patches/{0039-Improve-next-tick-list-performance-on-chunk-unloads-.patch => 0038-Improve-next-tick-list-performance-on-chunk-unloads-.patch} (99%) rename CraftBukkit-Patches/{0040-Remove-o-Option.patch => 0039-Remove-o-Option.patch} (92%) rename CraftBukkit-Patches/{0041-Recipe-Deconstruction.patch => 0040-Recipe-Deconstruction.patch} (97%) rename CraftBukkit-Patches/{0042-Fix-Health-Scaling.patch => 0041-Fix-Health-Scaling.patch} (97%) rename CraftBukkit-Patches/{0043-Fix-EntityShootBowEvent-with-Skeletons.patch => 0042-Fix-EntityShootBowEvent-with-Skeletons.patch} (95%) rename CraftBukkit-Patches/{0044-Implement-Arrow-API.patch => 0043-Implement-Arrow-API.patch} (93%) rename CraftBukkit-Patches/{0045-Particle-API.patch => 0044-Particle-API.patch} (99%) rename CraftBukkit-Patches/{0046-Hopper-Cooldowns.patch => 0045-Hopper-Cooldowns.patch} (96%) rename CraftBukkit-Patches/{0047-Prevent-Shutdown-Hang.patch => 0046-Prevent-Shutdown-Hang.patch} (94%) rename CraftBukkit-Patches/{0048-Implement-SpawnerSpawnEvent.patch => 0047-Implement-SpawnerSpawnEvent.patch} (98%) rename CraftBukkit-Patches/{0049-Firework-Meta-Crash-Fix.patch => 0048-Firework-Meta-Crash-Fix.patch} (94%) rename CraftBukkit-Patches/{0050-Do-Not-Search-for-Offline-Players.patch => 0049-Do-Not-Search-for-Offline-Players.patch} (89%) diff --git a/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch index 698c6fe..b8b40ef 100644 --- a/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch +++ b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch @@ -1,14 +1,58 @@ -From 944e72c8c821cfea28fb2d0f49262f209ab99bec Mon Sep 17 00:00:00 2001 +From 9e053fee3c3d3b2af10a4eb74a3d11d1a06ccb14 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:29:54 +1000 Subject: [PATCH] Fix Mob Spawning Relative to View Distance +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index 7416edc..e8d30c5 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -33,6 +33,7 @@ public class Chunk { + public int p; + private int u; + boolean q; ++ protected gnu.trove.map.hash.TObjectIntHashMap entityCount = new gnu.trove.map.hash.TObjectIntHashMap(); // Spigot + + public Chunk(World world, int i, int j) { + this.sections = new ChunkSection[16]; +@@ -560,6 +561,15 @@ public class Chunk { + entity.ak = k; + entity.al = this.z; + this.entitySlices[k].add(entity); ++ // Spigot start - increment creature type count ++ for ( EnumCreatureType creatureType : EnumCreatureType.values() ) ++ { ++ if ( creatureType.a().isAssignableFrom( entity.getClass() ) ) ++ { ++ this.entityCount.adjustOrPutValue( creatureType.a(), 1, 1 ); ++ } ++ } ++ // Spigot end + } + + public void b(Entity entity) { +@@ -576,6 +586,15 @@ public class Chunk { + } + + this.entitySlices[i].remove(entity); ++ // Spigot start - decrement creature type count ++ for ( EnumCreatureType creatureType : EnumCreatureType.values() ) ++ { ++ if ( creatureType.a().isAssignableFrom( entity.getClass() ) ) ++ { ++ this.entityCount.adjustValue( creatureType.a(), -1 ); ++ } ++ } ++ // Spigot end + } + + public boolean d(int i, int j, int k) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 056100f..c17ad8b 100644 +index 056100f..bec0d91 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -26,6 +26,32 @@ public final class SpawnerCreature { +@@ -26,6 +26,23 @@ public final class SpawnerCreature { return new ChunkPosition(k, i1, l); } @@ -20,18 +64,9 @@ index 056100f..c17ad8b 100644 + { + int x = LongHash.msw( coord ); + int z = LongHash.lsw( coord ); -+ if ( !server.chunkProviderServer.unloadQueue.contains( x, z ) && server.isChunkLoaded( x, z ) ) ++ if ( !server.chunkProviderServer.unloadQueue.contains( coord ) && server.isChunkLoaded( x, z ) ) + { -+ for ( List entitySlice : server.getChunkAt( x, z ).entitySlices ) -+ { -+ for ( Entity entity : entitySlice ) -+ { -+ if ( oClass.isAssignableFrom( entity.getClass() ) ) -+ { -+ ++i; -+ } -+ } -+ } ++ i += server.getChunkAt( x, z ).entityCount.get( oClass ); + } + } + return i; @@ -41,7 +76,7 @@ index 056100f..c17ad8b 100644 public static final int spawnEntities(WorldServer worldserver, boolean flag, boolean flag1, boolean flag2) { if (!flag && !flag1) { return 0; -@@ -41,6 +67,11 @@ public final class SpawnerCreature { +@@ -41,6 +58,11 @@ public final class SpawnerCreature { j = MathHelper.floor(entityhuman.locZ / 16.0D); byte b0 = 8; @@ -53,7 +88,7 @@ index 056100f..c17ad8b 100644 for (int l = -b0; l <= b0; ++l) { for (int i1 = -b0; i1 <= b0; ++i1) { -@@ -88,13 +119,15 @@ public final class SpawnerCreature { +@@ -88,13 +110,15 @@ public final class SpawnerCreature { if (limit == 0) { continue; } @@ -71,7 +106,7 @@ index 056100f..c17ad8b 100644 // CraftBukkit start long key = ((Long) iterator.next()).longValue(); -@@ -158,6 +191,13 @@ public final class SpawnerCreature { +@@ -158,6 +182,13 @@ public final class SpawnerCreature { a(entityliving, worldserver, f, f1, f2); worldserver.addEntity(entityliving, SpawnReason.NATURAL); // CraftBukkit end diff --git a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch index 95b4bb7..9aad829 100644 --- a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From 055bea092702d1912c8bd99415f3b1d91046672e Mon Sep 17 00:00:00 2001 +From 59f6244d29ad8a3a8b383267a4fe1749d7b34db4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -462,12 +462,12 @@ index 0000000..93ce20e + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 5e1cfa9..31f4c39 100644 +index e807ec8..c567250 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -142,4 +142,15 @@ public class SpigotWorldConfig - - antiXrayInstance = new AntiXray( this ); +@@ -149,4 +149,15 @@ public class SpigotWorldConfig + mobSpawnRange = getByte( "mob-spawn-range", 4 ); + log( "Mob Spawn Range: " + mobSpawnRange ); } + + public int animalActivationRange = 32; diff --git a/CraftBukkit-Patches/0024-Watchdog-Thread.patch b/CraftBukkit-Patches/0024-Watchdog-Thread.patch index 8a70121..0c3cfc2 100644 --- a/CraftBukkit-Patches/0024-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0024-Watchdog-Thread.patch @@ -1,4 +1,4 @@ -From a8d2f288d11999d0de83c613c73e5455ea3156c7 Mon Sep 17 00:00:00 2001 +From 21f77e26c9c80277b474d950860e63a27b0fd8f1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 12:33:20 +1100 Subject: [PATCH] Watchdog Thread. @@ -142,12 +142,12 @@ index 0000000..a5c4549 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 8711c7a..6e8bae8 100644 +index b5f3532..89b2927 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -114,4 +114,15 @@ public class SpigotConfig { - preventProxies = getBoolean( "settings.prevent-proxies", preventProxies ); + preventProxies = getBoolean( "settings.prevent-proxies", false ); } + + public static int timeoutTime = 60; diff --git a/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch index 2df6c00..dfcc5d6 100644 --- a/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch +++ b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch @@ -1,4 +1,4 @@ -From fd0be11a5ce06767e30b2d3f424712d24edc28f7 Mon Sep 17 00:00:00 2001 +From 909c3ed4c89b1a12496686b431ba74c1deb28c9c Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Feb 2013 11:58:47 -0500 Subject: [PATCH] Entity Tracking Ranges @@ -24,10 +24,10 @@ index d7efe3e..59586c2 100644 i = this.d; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 31f4c39..8ae36fe 100644 +index c567250..de052ad 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -153,4 +153,19 @@ public class SpigotWorldConfig +@@ -160,4 +160,19 @@ public class SpigotWorldConfig miscActivationRange = getInt( "entity-activation-range.misc", miscActivationRange ); log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Mi " + miscActivationRange ); } diff --git a/CraftBukkit-Patches/0035-Save-entity-counts-for-randomly-spawned-creatures-to.patch b/CraftBukkit-Patches/0035-Save-entity-counts-for-randomly-spawned-creatures-to.patch deleted file mode 100644 index 94fda21..0000000 --- a/CraftBukkit-Patches/0035-Save-entity-counts-for-randomly-spawned-creatures-to.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 9f6ff0b5899268bf52d195f7316c97d0b43ec22b 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 - - -diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 7416edc..958b5af 100644 ---- a/src/main/java/net/minecraft/server/Chunk.java -+++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -9,6 +9,7 @@ import java.util.Map; - import java.util.Random; - - import org.bukkit.Bukkit; // CraftBukkit -+import gnu.trove.map.hash.TObjectIntHashMap; // Spigot - - public class Chunk { - -@@ -33,6 +34,7 @@ public class Chunk { - public int p; - private int u; - boolean q; -+ protected TObjectIntHashMap entityCount = new TObjectIntHashMap(); // Spigot - - public Chunk(World world, int i, int j) { - this.sections = new ChunkSection[16]; -@@ -560,6 +562,13 @@ public class Chunk { - entity.ak = k; - entity.al = this.z; - this.entitySlices[k].add(entity); -+ // Spigot start - increment creature type count -+ for (EnumCreatureType creatureType : EnumCreatureType.values()) { -+ if (creatureType.a().isAssignableFrom(entity.getClass())) { -+ this.entityCount.adjustOrPutValue(creatureType.a(), 1, 1); -+ } -+ } -+ // Spigot end - } - - public void b(Entity entity) { -@@ -576,6 +585,13 @@ public class Chunk { - } - - this.entitySlices[i].remove(entity); -+ // Spigot start - decrement creature type count -+ for (EnumCreatureType creatureType : EnumCreatureType.values()) { -+ if (creatureType.a().isAssignableFrom(entity.getClass())) { -+ this.entityCount.adjustValue(creatureType.a(), -1); -+ } -+ } -+ // Spigot end - } - - public boolean d(int i, int j, int k) { -diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 3529074..25b83f7 100644 ---- a/src/main/java/net/minecraft/server/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -33,14 +33,8 @@ public final class SpawnerCreature { - for (Long coord : b.keySet()) { - int x = LongHash.msw(coord); - int z = LongHash.lsw(coord); -- if (!server.chunkProviderServer.unloadQueue.contains(x,z) && server.isChunkLoaded(x, z)) { -- for (List entitySlice : server.getChunkAt(x, z).entitySlices) { -- for (Entity entity : entitySlice) { -- if (oClass.isAssignableFrom(entity.getClass())) { -- ++i; -- } -- } -- } -+ if (!server.chunkProviderServer.unloadQueue.contains(coord) && server.isChunkLoaded(x, z)) { -+ i += server.getChunkAt(x, z).entityCount.get(oClass); - } - } - return i; --- -1.8.1.2 - diff --git a/CraftBukkit-Patches/0036-Thread-Naming-and-Tweaks.patch b/CraftBukkit-Patches/0035-Thread-Naming-and-Tweaks.patch similarity index 98% rename from CraftBukkit-Patches/0036-Thread-Naming-and-Tweaks.patch rename to CraftBukkit-Patches/0035-Thread-Naming-and-Tweaks.patch index 186ac36..de3186c 100644 --- a/CraftBukkit-Patches/0036-Thread-Naming-and-Tweaks.patch +++ b/CraftBukkit-Patches/0035-Thread-Naming-and-Tweaks.patch @@ -1,4 +1,4 @@ -From 86bed296f3b5ca333b92ae8d08ca2345b9d9a55f Mon Sep 17 00:00:00 2001 +From 53d53552c6ef582d5116ed29763c7e75087b3912 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:50:27 +1000 Subject: [PATCH] Thread Naming and Tweaks diff --git a/CraftBukkit-Patches/0037-Close-Unloaded-World-s-Save-Files.patch b/CraftBukkit-Patches/0036-Close-Unloaded-World-s-Save-Files.patch similarity index 96% rename from CraftBukkit-Patches/0037-Close-Unloaded-World-s-Save-Files.patch rename to CraftBukkit-Patches/0036-Close-Unloaded-World-s-Save-Files.patch index ea56dd6..cf9fd3a 100644 --- a/CraftBukkit-Patches/0037-Close-Unloaded-World-s-Save-Files.patch +++ b/CraftBukkit-Patches/0036-Close-Unloaded-World-s-Save-Files.patch @@ -1,4 +1,4 @@ -From 26cc0b29eadbb08eb1b3c68895e3c3c2ac217d76 Mon Sep 17 00:00:00 2001 +From b7b4d3fffc0fbf57e0a1d65d839fefc7a304cc74 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Wed, 27 Mar 2013 01:41:54 +0200 Subject: [PATCH] Close Unloaded World's Save Files @@ -18,7 +18,7 @@ index 900ed68..829f4a3 100644 public static synchronized RegionFile a(File file1, int i, int j) { File file2 = new File(file1, "region"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 20ba4b7..2e8187e 100644 +index c18e5e3..b32f6f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -37,6 +37,8 @@ import net.minecraft.server.MinecraftServer; diff --git a/CraftBukkit-Patches/0038-Optimized-version-of-LocaleLanguage.patch b/CraftBukkit-Patches/0037-Optimized-version-of-LocaleLanguage.patch similarity index 98% rename from CraftBukkit-Patches/0038-Optimized-version-of-LocaleLanguage.patch rename to CraftBukkit-Patches/0037-Optimized-version-of-LocaleLanguage.patch index d6aa5c0..7a2ad8e 100644 --- a/CraftBukkit-Patches/0038-Optimized-version-of-LocaleLanguage.patch +++ b/CraftBukkit-Patches/0037-Optimized-version-of-LocaleLanguage.patch @@ -1,4 +1,4 @@ -From da31d0f873c70b080ce64923ce8879ad80c37383 Mon Sep 17 00:00:00 2001 +From c23cc99833fb558581a2ca3be5c99c1f1bba72ac Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 8 May 2013 12:09:45 +1000 Subject: [PATCH] Optimized version of LocaleLanguage diff --git a/CraftBukkit-Patches/0039-Improve-next-tick-list-performance-on-chunk-unloads-.patch b/CraftBukkit-Patches/0038-Improve-next-tick-list-performance-on-chunk-unloads-.patch similarity index 99% rename from CraftBukkit-Patches/0039-Improve-next-tick-list-performance-on-chunk-unloads-.patch rename to CraftBukkit-Patches/0038-Improve-next-tick-list-performance-on-chunk-unloads-.patch index 7efa33c..8e8dd79 100644 --- a/CraftBukkit-Patches/0039-Improve-next-tick-list-performance-on-chunk-unloads-.patch +++ b/CraftBukkit-Patches/0038-Improve-next-tick-list-performance-on-chunk-unloads-.patch @@ -1,4 +1,4 @@ -From 73fc7751d67136785fe9dd8e37e6bd93e2b70b2a Mon Sep 17 00:00:00 2001 +From 034219b07622cced54214debbd0fa0c8acea439f Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Wed, 24 Apr 2013 01:43:33 -0500 Subject: [PATCH] Improve next-tick-list performance on chunk unloads, large diff --git a/CraftBukkit-Patches/0040-Remove-o-Option.patch b/CraftBukkit-Patches/0039-Remove-o-Option.patch similarity index 92% rename from CraftBukkit-Patches/0040-Remove-o-Option.patch rename to CraftBukkit-Patches/0039-Remove-o-Option.patch index 0a1a64e..0d2748a 100644 --- a/CraftBukkit-Patches/0040-Remove-o-Option.patch +++ b/CraftBukkit-Patches/0039-Remove-o-Option.patch @@ -1,4 +1,4 @@ -From e5fe9ccaefc62d0e2ec1c6c3f6c86f6d3512a77c Mon Sep 17 00:00:00 2001 +From 89b2eed1417170cf2023553d4faa6046e19453a9 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 19 May 2013 18:29:48 +1000 Subject: [PATCH] Remove -o Option diff --git a/CraftBukkit-Patches/0041-Recipe-Deconstruction.patch b/CraftBukkit-Patches/0040-Recipe-Deconstruction.patch similarity index 97% rename from CraftBukkit-Patches/0041-Recipe-Deconstruction.patch rename to CraftBukkit-Patches/0040-Recipe-Deconstruction.patch index 89ef2d3..bc9d7d5 100644 --- a/CraftBukkit-Patches/0041-Recipe-Deconstruction.patch +++ b/CraftBukkit-Patches/0040-Recipe-Deconstruction.patch @@ -1,4 +1,4 @@ -From aa8e03fbad9d6f5752f6a607cf9f4be005a0a645 Mon Sep 17 00:00:00 2001 +From ec8e652e930e20d85863f583db5d82405d239885 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 1 Jun 2013 16:34:38 +1000 Subject: [PATCH] Recipe Deconstruction diff --git a/CraftBukkit-Patches/0042-Fix-Health-Scaling.patch b/CraftBukkit-Patches/0041-Fix-Health-Scaling.patch similarity index 97% rename from CraftBukkit-Patches/0042-Fix-Health-Scaling.patch rename to CraftBukkit-Patches/0041-Fix-Health-Scaling.patch index 375005d..e191048 100644 --- a/CraftBukkit-Patches/0042-Fix-Health-Scaling.patch +++ b/CraftBukkit-Patches/0041-Fix-Health-Scaling.patch @@ -1,4 +1,4 @@ -From de527072801296213e67bec9e91c49309864229d Mon Sep 17 00:00:00 2001 +From f2e9b44c737fee7f28844e142871a84e98767a3c Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Sun, 2 Jun 2013 14:54:11 +1000 Subject: [PATCH] Fix Health Scaling diff --git a/CraftBukkit-Patches/0043-Fix-EntityShootBowEvent-with-Skeletons.patch b/CraftBukkit-Patches/0042-Fix-EntityShootBowEvent-with-Skeletons.patch similarity index 95% rename from CraftBukkit-Patches/0043-Fix-EntityShootBowEvent-with-Skeletons.patch rename to CraftBukkit-Patches/0042-Fix-EntityShootBowEvent-with-Skeletons.patch index 1fc7750..a8429f4 100644 --- a/CraftBukkit-Patches/0043-Fix-EntityShootBowEvent-with-Skeletons.patch +++ b/CraftBukkit-Patches/0042-Fix-EntityShootBowEvent-with-Skeletons.patch @@ -1,4 +1,4 @@ -From 7fdad06746184ebc24668b3358d60142108107d5 Mon Sep 17 00:00:00 2001 +From 786be74a1dcb09d71c6992fa89699dfd084f3aaa Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Sun, 2 Jun 2013 15:04:37 +1000 Subject: [PATCH] Fix EntityShootBowEvent with Skeletons diff --git a/CraftBukkit-Patches/0044-Implement-Arrow-API.patch b/CraftBukkit-Patches/0043-Implement-Arrow-API.patch similarity index 93% rename from CraftBukkit-Patches/0044-Implement-Arrow-API.patch rename to CraftBukkit-Patches/0043-Implement-Arrow-API.patch index 63a5bd3..38ada62 100644 --- a/CraftBukkit-Patches/0044-Implement-Arrow-API.patch +++ b/CraftBukkit-Patches/0043-Implement-Arrow-API.patch @@ -1,4 +1,4 @@ -From 6a923051c0ba21fb7179bac35c4b4a93562b90bc Mon Sep 17 00:00:00 2001 +From 486edfbe72d601217a4dd8a6695de10b5c333c0a Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 15:16:05 +1000 Subject: [PATCH] Implement Arrow API diff --git a/CraftBukkit-Patches/0045-Particle-API.patch b/CraftBukkit-Patches/0044-Particle-API.patch similarity index 99% rename from CraftBukkit-Patches/0045-Particle-API.patch rename to CraftBukkit-Patches/0044-Particle-API.patch index 275ba46..1b93a28 100644 --- a/CraftBukkit-Patches/0045-Particle-API.patch +++ b/CraftBukkit-Patches/0044-Particle-API.patch @@ -1,4 +1,4 @@ -From da41cfb02d8d4c9c0ef92f3da1d0dba1ad597c86 Mon Sep 17 00:00:00 2001 +From 21866de8328ae6f2caebf0112212db82d8271adb Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 16:14:30 +1000 Subject: [PATCH] Particle API diff --git a/CraftBukkit-Patches/0046-Hopper-Cooldowns.patch b/CraftBukkit-Patches/0045-Hopper-Cooldowns.patch similarity index 96% rename from CraftBukkit-Patches/0046-Hopper-Cooldowns.patch rename to CraftBukkit-Patches/0045-Hopper-Cooldowns.patch index 70366c6..ad42334 100644 --- a/CraftBukkit-Patches/0046-Hopper-Cooldowns.patch +++ b/CraftBukkit-Patches/0045-Hopper-Cooldowns.patch @@ -1,4 +1,4 @@ -From 862436c501725e9bc306c4d7f931daec482a3a4d Mon Sep 17 00:00:00 2001 +From 82ed5616d56e9808448eddaff3c1704853e4d4d5 Mon Sep 17 00:00:00 2001 From: DerFlash Date: Sun, 2 Jun 2013 16:23:46 +1000 Subject: [PATCH] Hopper Cooldowns @@ -64,10 +64,10 @@ index f6d269d..1f69c7b 100644 iinventory.update(); diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 8ae36fe..aea0b37 100644 +index de052ad..6d30a58 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -168,4 +168,13 @@ public class SpigotWorldConfig +@@ -175,4 +175,13 @@ public class SpigotWorldConfig maxTrackingRange = getInt( "entity-tracking-range.other", maxTrackingRange ); log( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Other " + maxTrackingRange ); } diff --git a/CraftBukkit-Patches/0047-Prevent-Shutdown-Hang.patch b/CraftBukkit-Patches/0046-Prevent-Shutdown-Hang.patch similarity index 94% rename from CraftBukkit-Patches/0047-Prevent-Shutdown-Hang.patch rename to CraftBukkit-Patches/0046-Prevent-Shutdown-Hang.patch index c206388..ab8013e 100644 --- a/CraftBukkit-Patches/0047-Prevent-Shutdown-Hang.patch +++ b/CraftBukkit-Patches/0046-Prevent-Shutdown-Hang.patch @@ -1,4 +1,4 @@ -From 8a29ec73d104d1095f4e308ca9f544360a36604d Mon Sep 17 00:00:00 2001 +From 761f033bf12a80a479d7cac62eba1603773a97e7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 11:54:32 +1000 Subject: [PATCH] Prevent Shutdown Hang diff --git a/CraftBukkit-Patches/0048-Implement-SpawnerSpawnEvent.patch b/CraftBukkit-Patches/0047-Implement-SpawnerSpawnEvent.patch similarity index 98% rename from CraftBukkit-Patches/0048-Implement-SpawnerSpawnEvent.patch rename to CraftBukkit-Patches/0047-Implement-SpawnerSpawnEvent.patch index ddd3aba..7db6405 100644 --- a/CraftBukkit-Patches/0048-Implement-SpawnerSpawnEvent.patch +++ b/CraftBukkit-Patches/0047-Implement-SpawnerSpawnEvent.patch @@ -1,4 +1,4 @@ -From a3262c25cfe4ed0aba83221d6ead8287fff8b7a7 Mon Sep 17 00:00:00 2001 +From bb650303050f8dc42e5bdc7861e53cd609179bd3 Mon Sep 17 00:00:00 2001 From: Andy Shulman Date: Mon, 15 Apr 2013 20:06:37 -0500 Subject: [PATCH] Implement SpawnerSpawnEvent. diff --git a/CraftBukkit-Patches/0049-Firework-Meta-Crash-Fix.patch b/CraftBukkit-Patches/0048-Firework-Meta-Crash-Fix.patch similarity index 94% rename from CraftBukkit-Patches/0049-Firework-Meta-Crash-Fix.patch rename to CraftBukkit-Patches/0048-Firework-Meta-Crash-Fix.patch index 75431de..e76a417 100644 --- a/CraftBukkit-Patches/0049-Firework-Meta-Crash-Fix.patch +++ b/CraftBukkit-Patches/0048-Firework-Meta-Crash-Fix.patch @@ -1,4 +1,4 @@ -From 74402ddfe7d7f0a239f0ee650d08fcde49e5ca46 Mon Sep 17 00:00:00 2001 +From 5045925cd02c861e4c6199c0d5eb9148c365daba Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 15 Jun 2013 21:34:48 +1000 Subject: [PATCH] Firework Meta Crash Fix diff --git a/CraftBukkit-Patches/0050-Do-Not-Search-for-Offline-Players.patch b/CraftBukkit-Patches/0049-Do-Not-Search-for-Offline-Players.patch similarity index 89% rename from CraftBukkit-Patches/0050-Do-Not-Search-for-Offline-Players.patch rename to CraftBukkit-Patches/0049-Do-Not-Search-for-Offline-Players.patch index 2a31697..8c94849 100644 --- a/CraftBukkit-Patches/0050-Do-Not-Search-for-Offline-Players.patch +++ b/CraftBukkit-Patches/0049-Do-Not-Search-for-Offline-Players.patch @@ -1,4 +1,4 @@ -From e6ff7cb814f556fd3bac83c60e8a7d89d147e339 Mon Sep 17 00:00:00 2001 +From 0ba4e79de49929e8f82c0f42539af7b7333a7e6f Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jun 2013 08:20:26 +1000 Subject: [PATCH] Do Not Search for Offline Players @@ -6,7 +6,7 @@ Subject: [PATCH] Do Not Search for Offline Players By default we do not want to search as this leads to massive load times for plugins wanting to do mass data lookups. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2e8187e..e7f4b14 100644 +index b32f6f1..8990b9f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1085,7 +1085,7 @@ public final class CraftServer implements Server { From e94f09ff804f98e998110e33d0caa543b7241863 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:41:26 +1000 Subject: [PATCH 19/40] Ping sending patch done --- .../0004-Spigot-Configuration.patch | 10 ++--- ...b-Spawning-Relative-to-View-Distance.patch | 6 +-- .../0022-Entity-Activation-Range.patch | 6 +-- ...> 0033-Enable-Improved-Ping-Sending.patch} | 39 +++++++++---------- 4 files changed, 30 insertions(+), 31 deletions(-) rename CraftBukkit-Patches/{0033-Enable-Improved-ping-sending.patch => 0033-Enable-Improved-Ping-Sending.patch} (54%) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 9066d40..49e1959 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,4 +1,4 @@ -From 0abff71f90ac188f2bc11f81faa224f58179f1c8 Mon Sep 17 00:00:00 2001 +From ba981dd9b929cf59480d214ed9de8cd79c3bdbbc Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 17:35:57 +1000 Subject: [PATCH] Spigot Configuration @@ -38,7 +38,7 @@ index 3a4ddea..de052bd 100644 this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..bf297bc +index 0000000..43d94fe --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +1,98 @@ @@ -128,7 +128,7 @@ index 0000000..bf297bc + return config.getInt( path, config.getInt( path ) ); + } + -+ private List getList(String path, T def) ++ private List getList(String path, T def) + { + config.addDefault( path, def ); + return (List) config.getList( path, config.getList( path ) ); @@ -142,7 +142,7 @@ index 0000000..bf297bc +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java new file mode 100644 -index 0000000..6642e86 +index 0000000..facea4f --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -0,0 +1,63 @@ @@ -197,7 +197,7 @@ index 0000000..6642e86 + return config.getInt( "world-settings." + worldName + "." + path, config.getInt( "world-settings.default." + path ) ); + } + -+ private List getList(String path, T def) ++ private List getList(String path, T def) + { + config.addDefault( "world-settings.default." + path, def ); + return (List) config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) ); diff --git a/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch index b8b40ef..13da4c0 100644 --- a/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch +++ b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch @@ -1,4 +1,4 @@ -From 9e053fee3c3d3b2af10a4eb74a3d11d1a06ccb14 Mon Sep 17 00:00:00 2001 +From 0ad89ba769c9c32aa1fe9b2174a80077cbf42ef1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:29:54 +1000 Subject: [PATCH] Fix Mob Spawning Relative to View Distance @@ -121,7 +121,7 @@ index 056100f..bec0d91 100644 continue label110; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 5e1cfa9..e807ec8 100644 +index eac85fc..6db43d8 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -142,4 +142,11 @@ public class SpigotWorldConfig @@ -132,7 +132,7 @@ index 5e1cfa9..e807ec8 100644 + public byte mobSpawnRange; + private void mobSpawnRange() + { -+ mobSpawnRange = getByte( "mob-spawn-range", 4 ); ++ mobSpawnRange = (byte) getInt( "mob-spawn-range", 4 ); + log( "Mob Spawn Range: " + mobSpawnRange ); + } } diff --git a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch index 9aad829..0418174 100644 --- a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From 59f6244d29ad8a3a8b383267a4fe1749d7b34db4 Mon Sep 17 00:00:00 2001 +From 3e2225679ce7bb228ae9527d4cae18bc1523e92d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -462,11 +462,11 @@ index 0000000..93ce20e + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index e807ec8..c567250 100644 +index 6db43d8..494a94e 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -149,4 +149,15 @@ public class SpigotWorldConfig - mobSpawnRange = getByte( "mob-spawn-range", 4 ); + mobSpawnRange = (byte) getInt( "mob-spawn-range", 4 ); log( "Mob Spawn Range: " + mobSpawnRange ); } + diff --git a/CraftBukkit-Patches/0033-Enable-Improved-ping-sending.patch b/CraftBukkit-Patches/0033-Enable-Improved-Ping-Sending.patch similarity index 54% rename from CraftBukkit-Patches/0033-Enable-Improved-ping-sending.patch rename to CraftBukkit-Patches/0033-Enable-Improved-Ping-Sending.patch index be14b47..3577f9f 100644 --- a/CraftBukkit-Patches/0033-Enable-Improved-ping-sending.patch +++ b/CraftBukkit-Patches/0033-Enable-Improved-Ping-Sending.patch @@ -1,11 +1,8 @@ -From 9b8d56fab138108ef3d328c5fe52cade92b13ce3 Mon Sep 17 00:00:00 2001 +From de9ad985c0772ebe1ab6eb22283e76100119adf0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Feb 2013 20:45:20 +1100 -Subject: [PATCH] Enable Improved ping sending +Subject: [PATCH] Enable Improved Ping Sending - 3 files changed, 18 insertions(+) - - 3 files changed, 18 insertions(+) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index 7de5b48..35a579c 100644 @@ -20,33 +17,35 @@ index 7de5b48..35a579c 100644 public EntityPlayer(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager playerinteractmanager) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 30c6503..a236c5f 100644 +index 30c6503..1891308 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -717,7 +717,23 @@ public abstract class PlayerList { +@@ -717,6 +717,25 @@ public abstract class PlayerList { this.sendAll(new Packet201PlayerInfo(entityplayer.name, true, entityplayer.ping)); } // CraftBukkit end */ + // Spigot start -+ if (this.players.size() == 0 || !org.bukkit.craftbukkit.Spigot.tabPing) { -+ return; -+ } -+ int index = MinecraftServer.currentTick % this.players.size(); -+ EntityPlayer player = (EntityPlayer) this.players.get(index); -+ if (player.lastPing == -1 || Math.abs(player.ping - player.lastPing) > 20) { -+ Packet packet = new Packet201PlayerInfo(player.listName, true, player.ping); -+ for (EntityPlayer splayer : (List) this.players) { -+ if (splayer.getBukkitEntity().canSee(player.getBukkitEntity())) { -+ splayer.playerConnection.sendPacket(packet); ++ if ( !players.isEmpty() ) ++ { ++ int index = MinecraftServer.currentTick % this.players.size(); ++ EntityPlayer player = (EntityPlayer) this.players.get( index ); ++ if ( player.lastPing == -1 || Math.abs( player.ping - player.lastPing ) > 20 ) ++ { ++ Packet packet = new Packet201PlayerInfo( player.listName, true, player.ping ); ++ for ( EntityPlayer splayer : (List) this.players ) ++ { ++ if ( splayer.getBukkitEntity().canSee( player.getBukkitEntity() ) ) ++ { ++ splayer.playerConnection.sendPacket( packet ); ++ } + } ++ player.lastPing = player.ping; + } -+ player.lastPing = player.ping; + } ++ // Spigot end } -+ // Spigot end public void sendAll(Packet packet) { - for (int i = 0; i < this.players.size(); ++i) { -- 1.8.1.2 From 61dd3c68345b18aac8f7dbc18b7966a3088825af Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:42:59 +1000 Subject: [PATCH 20/40] Experimentally remove another patch --- ...> 0032-Enable-Improved-Ping-Sending.patch} | 2 +- ...eption-for-disabled-plugin-tasks.-Fi.patch | 33 ------------------- ...t-handshake-spam-from-invalid-names.patch} | 2 +- ...ch => 0034-Thread-Naming-and-Tweaks.patch} | 6 ++-- ...5-Close-Unloaded-World-s-Save-Files.patch} | 2 +- ...Optimized-version-of-LocaleLanguage.patch} | 2 +- ...-list-performance-on-chunk-unloads-.patch} | 2 +- ...ption.patch => 0038-Remove-o-Option.patch} | 2 +- ...patch => 0039-Recipe-Deconstruction.patch} | 2 +- ...ng.patch => 0040-Fix-Health-Scaling.patch} | 2 +- ...-EntityShootBowEvent-with-Skeletons.patch} | 2 +- ...I.patch => 0042-Implement-Arrow-API.patch} | 2 +- ...icle-API.patch => 0043-Particle-API.patch} | 2 +- ...owns.patch => 0044-Hopper-Cooldowns.patch} | 4 +-- ...patch => 0045-Prevent-Shutdown-Hang.patch} | 6 ++-- ...=> 0046-Implement-SpawnerSpawnEvent.patch} | 2 +- ...tch => 0047-Firework-Meta-Crash-Fix.patch} | 2 +- ...8-Do-Not-Search-for-Offline-Players.patch} | 2 +- 18 files changed, 22 insertions(+), 55 deletions(-) rename CraftBukkit-Patches/{0033-Enable-Improved-Ping-Sending.patch => 0032-Enable-Improved-Ping-Sending.patch} (97%) delete mode 100644 CraftBukkit-Patches/0032-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch rename CraftBukkit-Patches/{0034-Prevent-handshake-spam-from-invalid-names.patch => 0033-Prevent-handshake-spam-from-invalid-names.patch} (94%) rename CraftBukkit-Patches/{0035-Thread-Naming-and-Tweaks.patch => 0034-Thread-Naming-and-Tweaks.patch} (95%) rename CraftBukkit-Patches/{0036-Close-Unloaded-World-s-Save-Files.patch => 0035-Close-Unloaded-World-s-Save-Files.patch} (97%) rename CraftBukkit-Patches/{0037-Optimized-version-of-LocaleLanguage.patch => 0036-Optimized-version-of-LocaleLanguage.patch} (98%) rename CraftBukkit-Patches/{0038-Improve-next-tick-list-performance-on-chunk-unloads-.patch => 0037-Improve-next-tick-list-performance-on-chunk-unloads-.patch} (99%) rename CraftBukkit-Patches/{0039-Remove-o-Option.patch => 0038-Remove-o-Option.patch} (92%) rename CraftBukkit-Patches/{0040-Recipe-Deconstruction.patch => 0039-Recipe-Deconstruction.patch} (97%) rename CraftBukkit-Patches/{0041-Fix-Health-Scaling.patch => 0040-Fix-Health-Scaling.patch} (97%) rename CraftBukkit-Patches/{0042-Fix-EntityShootBowEvent-with-Skeletons.patch => 0041-Fix-EntityShootBowEvent-with-Skeletons.patch} (95%) rename CraftBukkit-Patches/{0043-Implement-Arrow-API.patch => 0042-Implement-Arrow-API.patch} (93%) rename CraftBukkit-Patches/{0044-Particle-API.patch => 0043-Particle-API.patch} (99%) rename CraftBukkit-Patches/{0045-Hopper-Cooldowns.patch => 0044-Hopper-Cooldowns.patch} (97%) rename CraftBukkit-Patches/{0046-Prevent-Shutdown-Hang.patch => 0045-Prevent-Shutdown-Hang.patch} (87%) rename CraftBukkit-Patches/{0047-Implement-SpawnerSpawnEvent.patch => 0046-Implement-SpawnerSpawnEvent.patch} (98%) rename CraftBukkit-Patches/{0048-Firework-Meta-Crash-Fix.patch => 0047-Firework-Meta-Crash-Fix.patch} (94%) rename CraftBukkit-Patches/{0049-Do-Not-Search-for-Offline-Players.patch => 0048-Do-Not-Search-for-Offline-Players.patch} (93%) diff --git a/CraftBukkit-Patches/0033-Enable-Improved-Ping-Sending.patch b/CraftBukkit-Patches/0032-Enable-Improved-Ping-Sending.patch similarity index 97% rename from CraftBukkit-Patches/0033-Enable-Improved-Ping-Sending.patch rename to CraftBukkit-Patches/0032-Enable-Improved-Ping-Sending.patch index 3577f9f..d913241 100644 --- a/CraftBukkit-Patches/0033-Enable-Improved-Ping-Sending.patch +++ b/CraftBukkit-Patches/0032-Enable-Improved-Ping-Sending.patch @@ -1,4 +1,4 @@ -From de9ad985c0772ebe1ab6eb22283e76100119adf0 Mon Sep 17 00:00:00 2001 +From 093c26055d78b7e52e6653e47dc73ae765decf5c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Feb 2013 20:45:20 +1100 Subject: [PATCH] Enable Improved Ping Sending diff --git a/CraftBukkit-Patches/0032-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch b/CraftBukkit-Patches/0032-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch deleted file mode 100644 index f3ef09c..0000000 --- a/CraftBukkit-Patches/0032-Revert-Throw-exception-for-disabled-plugin-tasks.-Fi.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 002897e8a239938b0a072e9c89ecc2dc39e88a1c 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 - BUKKIT-3951" - -This reverts commit 052e955ed71a30516a5e9cfd76649daaba4ae7d8. - -diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 84dcfcc..0a5c61a 100644 ---- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -@@ -15,7 +15,6 @@ import java.util.concurrent.atomic.AtomicReference; - import java.util.logging.Level; - - import org.apache.commons.lang.Validate; --import org.bukkit.plugin.IllegalPluginAccessException; - import org.bukkit.plugin.Plugin; - import org.bukkit.scheduler.BukkitScheduler; - import org.bukkit.scheduler.BukkitTask; -@@ -390,9 +389,6 @@ public class CraftScheduler implements BukkitScheduler { - private static void validate(final Plugin plugin, final Object task) { - Validate.notNull(plugin, "Plugin cannot be null"); - Validate.notNull(task, "Task cannot be null"); -- if (!plugin.isEnabled()) { -- throw new IllegalPluginAccessException("Plugin attempted to register task while disabled"); -- } - } - - private int nextId() { --- -1.8.1.2 - diff --git a/CraftBukkit-Patches/0034-Prevent-handshake-spam-from-invalid-names.patch b/CraftBukkit-Patches/0033-Prevent-handshake-spam-from-invalid-names.patch similarity index 94% rename from CraftBukkit-Patches/0034-Prevent-handshake-spam-from-invalid-names.patch rename to CraftBukkit-Patches/0033-Prevent-handshake-spam-from-invalid-names.patch index cea82b6..a17b54a 100644 --- a/CraftBukkit-Patches/0034-Prevent-handshake-spam-from-invalid-names.patch +++ b/CraftBukkit-Patches/0033-Prevent-handshake-spam-from-invalid-names.patch @@ -1,4 +1,4 @@ -From 81f21d28642e50e9fae1f7feadbb2882e7820f40 Mon Sep 17 00:00:00 2001 +From 2fd3ed6ad7d63cdd7ada4ea8a3b3c57e8881e003 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/CraftBukkit-Patches/0035-Thread-Naming-and-Tweaks.patch b/CraftBukkit-Patches/0034-Thread-Naming-and-Tweaks.patch similarity index 95% rename from CraftBukkit-Patches/0035-Thread-Naming-and-Tweaks.patch rename to CraftBukkit-Patches/0034-Thread-Naming-and-Tweaks.patch index de3186c..a221cf1 100644 --- a/CraftBukkit-Patches/0035-Thread-Naming-and-Tweaks.patch +++ b/CraftBukkit-Patches/0034-Thread-Naming-and-Tweaks.patch @@ -1,4 +1,4 @@ -From 53d53552c6ef582d5116ed29763c7e75087b3912 Mon Sep 17 00:00:00 2001 +From 3ffe256945a7df36f9b9fe08be2b44547d8e9c14 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:50:27 +1000 Subject: [PATCH] Thread Naming and Tweaks @@ -43,10 +43,10 @@ index a4eae65..496cfe4 100644 // CraftBukkit end this.pendingConnection = pendingconnection; diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 0a5c61a..35badf3 100644 +index 84dcfcc..a30f217 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -@@ -70,7 +70,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -71,7 +71,7 @@ public class CraftScheduler implements BukkitScheduler { */ private final ConcurrentHashMap runners = new ConcurrentHashMap(); private volatile int currentTick = -1; diff --git a/CraftBukkit-Patches/0036-Close-Unloaded-World-s-Save-Files.patch b/CraftBukkit-Patches/0035-Close-Unloaded-World-s-Save-Files.patch similarity index 97% rename from CraftBukkit-Patches/0036-Close-Unloaded-World-s-Save-Files.patch rename to CraftBukkit-Patches/0035-Close-Unloaded-World-s-Save-Files.patch index cf9fd3a..d7a0ffd 100644 --- a/CraftBukkit-Patches/0036-Close-Unloaded-World-s-Save-Files.patch +++ b/CraftBukkit-Patches/0035-Close-Unloaded-World-s-Save-Files.patch @@ -1,4 +1,4 @@ -From b7b4d3fffc0fbf57e0a1d65d839fefc7a304cc74 Mon Sep 17 00:00:00 2001 +From 961f5828c4eff61d46057d9c5da25fbd636a8519 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Wed, 27 Mar 2013 01:41:54 +0200 Subject: [PATCH] Close Unloaded World's Save Files diff --git a/CraftBukkit-Patches/0037-Optimized-version-of-LocaleLanguage.patch b/CraftBukkit-Patches/0036-Optimized-version-of-LocaleLanguage.patch similarity index 98% rename from CraftBukkit-Patches/0037-Optimized-version-of-LocaleLanguage.patch rename to CraftBukkit-Patches/0036-Optimized-version-of-LocaleLanguage.patch index 7a2ad8e..aeb6d69 100644 --- a/CraftBukkit-Patches/0037-Optimized-version-of-LocaleLanguage.patch +++ b/CraftBukkit-Patches/0036-Optimized-version-of-LocaleLanguage.patch @@ -1,4 +1,4 @@ -From c23cc99833fb558581a2ca3be5c99c1f1bba72ac Mon Sep 17 00:00:00 2001 +From d7aef73a55fb697a5609c584f34f684085497fb9 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 8 May 2013 12:09:45 +1000 Subject: [PATCH] Optimized version of LocaleLanguage diff --git a/CraftBukkit-Patches/0038-Improve-next-tick-list-performance-on-chunk-unloads-.patch b/CraftBukkit-Patches/0037-Improve-next-tick-list-performance-on-chunk-unloads-.patch similarity index 99% rename from CraftBukkit-Patches/0038-Improve-next-tick-list-performance-on-chunk-unloads-.patch rename to CraftBukkit-Patches/0037-Improve-next-tick-list-performance-on-chunk-unloads-.patch index 8e8dd79..6d90615 100644 --- a/CraftBukkit-Patches/0038-Improve-next-tick-list-performance-on-chunk-unloads-.patch +++ b/CraftBukkit-Patches/0037-Improve-next-tick-list-performance-on-chunk-unloads-.patch @@ -1,4 +1,4 @@ -From 034219b07622cced54214debbd0fa0c8acea439f Mon Sep 17 00:00:00 2001 +From 9748c8731abbaeaeef82d6090504516a34b05d88 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Wed, 24 Apr 2013 01:43:33 -0500 Subject: [PATCH] Improve next-tick-list performance on chunk unloads, large diff --git a/CraftBukkit-Patches/0039-Remove-o-Option.patch b/CraftBukkit-Patches/0038-Remove-o-Option.patch similarity index 92% rename from CraftBukkit-Patches/0039-Remove-o-Option.patch rename to CraftBukkit-Patches/0038-Remove-o-Option.patch index 0d2748a..56e5749 100644 --- a/CraftBukkit-Patches/0039-Remove-o-Option.patch +++ b/CraftBukkit-Patches/0038-Remove-o-Option.patch @@ -1,4 +1,4 @@ -From 89b2eed1417170cf2023553d4faa6046e19453a9 Mon Sep 17 00:00:00 2001 +From ae0e44f5154f07327ce85320d291f6d38d2b96b7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 19 May 2013 18:29:48 +1000 Subject: [PATCH] Remove -o Option diff --git a/CraftBukkit-Patches/0040-Recipe-Deconstruction.patch b/CraftBukkit-Patches/0039-Recipe-Deconstruction.patch similarity index 97% rename from CraftBukkit-Patches/0040-Recipe-Deconstruction.patch rename to CraftBukkit-Patches/0039-Recipe-Deconstruction.patch index bc9d7d5..0438442 100644 --- a/CraftBukkit-Patches/0040-Recipe-Deconstruction.patch +++ b/CraftBukkit-Patches/0039-Recipe-Deconstruction.patch @@ -1,4 +1,4 @@ -From ec8e652e930e20d85863f583db5d82405d239885 Mon Sep 17 00:00:00 2001 +From 584fae45430e0fd52bcdb5742ca77f893a862264 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 1 Jun 2013 16:34:38 +1000 Subject: [PATCH] Recipe Deconstruction diff --git a/CraftBukkit-Patches/0041-Fix-Health-Scaling.patch b/CraftBukkit-Patches/0040-Fix-Health-Scaling.patch similarity index 97% rename from CraftBukkit-Patches/0041-Fix-Health-Scaling.patch rename to CraftBukkit-Patches/0040-Fix-Health-Scaling.patch index e191048..a36c6b7 100644 --- a/CraftBukkit-Patches/0041-Fix-Health-Scaling.patch +++ b/CraftBukkit-Patches/0040-Fix-Health-Scaling.patch @@ -1,4 +1,4 @@ -From f2e9b44c737fee7f28844e142871a84e98767a3c Mon Sep 17 00:00:00 2001 +From 5537a2a1c5596e5df2f5f3d9c953f46ef7e3d372 Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Sun, 2 Jun 2013 14:54:11 +1000 Subject: [PATCH] Fix Health Scaling diff --git a/CraftBukkit-Patches/0042-Fix-EntityShootBowEvent-with-Skeletons.patch b/CraftBukkit-Patches/0041-Fix-EntityShootBowEvent-with-Skeletons.patch similarity index 95% rename from CraftBukkit-Patches/0042-Fix-EntityShootBowEvent-with-Skeletons.patch rename to CraftBukkit-Patches/0041-Fix-EntityShootBowEvent-with-Skeletons.patch index a8429f4..d022264 100644 --- a/CraftBukkit-Patches/0042-Fix-EntityShootBowEvent-with-Skeletons.patch +++ b/CraftBukkit-Patches/0041-Fix-EntityShootBowEvent-with-Skeletons.patch @@ -1,4 +1,4 @@ -From 786be74a1dcb09d71c6992fa89699dfd084f3aaa Mon Sep 17 00:00:00 2001 +From 88def699bf4f7a11ff3764f0ecd9831c162ad0e2 Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Sun, 2 Jun 2013 15:04:37 +1000 Subject: [PATCH] Fix EntityShootBowEvent with Skeletons diff --git a/CraftBukkit-Patches/0043-Implement-Arrow-API.patch b/CraftBukkit-Patches/0042-Implement-Arrow-API.patch similarity index 93% rename from CraftBukkit-Patches/0043-Implement-Arrow-API.patch rename to CraftBukkit-Patches/0042-Implement-Arrow-API.patch index 38ada62..bbd2284 100644 --- a/CraftBukkit-Patches/0043-Implement-Arrow-API.patch +++ b/CraftBukkit-Patches/0042-Implement-Arrow-API.patch @@ -1,4 +1,4 @@ -From 486edfbe72d601217a4dd8a6695de10b5c333c0a Mon Sep 17 00:00:00 2001 +From 9bcb4c341ee6908fa4a141583283d21283f26a55 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 15:16:05 +1000 Subject: [PATCH] Implement Arrow API diff --git a/CraftBukkit-Patches/0044-Particle-API.patch b/CraftBukkit-Patches/0043-Particle-API.patch similarity index 99% rename from CraftBukkit-Patches/0044-Particle-API.patch rename to CraftBukkit-Patches/0043-Particle-API.patch index 1b93a28..3cb0082 100644 --- a/CraftBukkit-Patches/0044-Particle-API.patch +++ b/CraftBukkit-Patches/0043-Particle-API.patch @@ -1,4 +1,4 @@ -From 21866de8328ae6f2caebf0112212db82d8271adb Mon Sep 17 00:00:00 2001 +From d1725f257553f7abf4fa2f13734713972b756b06 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 16:14:30 +1000 Subject: [PATCH] Particle API diff --git a/CraftBukkit-Patches/0045-Hopper-Cooldowns.patch b/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch similarity index 97% rename from CraftBukkit-Patches/0045-Hopper-Cooldowns.patch rename to CraftBukkit-Patches/0044-Hopper-Cooldowns.patch index ad42334..3681ae3 100644 --- a/CraftBukkit-Patches/0045-Hopper-Cooldowns.patch +++ b/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch @@ -1,4 +1,4 @@ -From 82ed5616d56e9808448eddaff3c1704853e4d4d5 Mon Sep 17 00:00:00 2001 +From 4a2de4a9743e9e7b558366b8128dae5fd4cb3e0d Mon Sep 17 00:00:00 2001 From: DerFlash Date: Sun, 2 Jun 2013 16:23:46 +1000 Subject: [PATCH] Hopper Cooldowns @@ -64,7 +64,7 @@ index f6d269d..1f69c7b 100644 iinventory.update(); diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index de052ad..6d30a58 100644 +index 87d3b6e..0a30d4c 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -175,4 +175,13 @@ public class SpigotWorldConfig diff --git a/CraftBukkit-Patches/0046-Prevent-Shutdown-Hang.patch b/CraftBukkit-Patches/0045-Prevent-Shutdown-Hang.patch similarity index 87% rename from CraftBukkit-Patches/0046-Prevent-Shutdown-Hang.patch rename to CraftBukkit-Patches/0045-Prevent-Shutdown-Hang.patch index ab8013e..90ae321 100644 --- a/CraftBukkit-Patches/0046-Prevent-Shutdown-Hang.patch +++ b/CraftBukkit-Patches/0045-Prevent-Shutdown-Hang.patch @@ -1,4 +1,4 @@ -From 761f033bf12a80a479d7cac62eba1603773a97e7 Mon Sep 17 00:00:00 2001 +From c18ceeae093ea461e065fbea7051ab0917bf29dd Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 11:54:32 +1000 Subject: [PATCH] Prevent Shutdown Hang @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Shutdown Hang Prevents server hanging if players disconnect during the shutdown sequence. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a236c5f..6a58663 100644 +index 1891308..fe846af 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1064,7 +1064,14 @@ public abstract class PlayerList { +@@ -1067,7 +1067,14 @@ public abstract class PlayerList { public void r() { while (!this.players.isEmpty()) { diff --git a/CraftBukkit-Patches/0047-Implement-SpawnerSpawnEvent.patch b/CraftBukkit-Patches/0046-Implement-SpawnerSpawnEvent.patch similarity index 98% rename from CraftBukkit-Patches/0047-Implement-SpawnerSpawnEvent.patch rename to CraftBukkit-Patches/0046-Implement-SpawnerSpawnEvent.patch index 7db6405..8600f3c 100644 --- a/CraftBukkit-Patches/0047-Implement-SpawnerSpawnEvent.patch +++ b/CraftBukkit-Patches/0046-Implement-SpawnerSpawnEvent.patch @@ -1,4 +1,4 @@ -From bb650303050f8dc42e5bdc7861e53cd609179bd3 Mon Sep 17 00:00:00 2001 +From 6257069117c3870c0b8640386252867a3f4f5c0a Mon Sep 17 00:00:00 2001 From: Andy Shulman Date: Mon, 15 Apr 2013 20:06:37 -0500 Subject: [PATCH] Implement SpawnerSpawnEvent. diff --git a/CraftBukkit-Patches/0048-Firework-Meta-Crash-Fix.patch b/CraftBukkit-Patches/0047-Firework-Meta-Crash-Fix.patch similarity index 94% rename from CraftBukkit-Patches/0048-Firework-Meta-Crash-Fix.patch rename to CraftBukkit-Patches/0047-Firework-Meta-Crash-Fix.patch index e76a417..5acb26b 100644 --- a/CraftBukkit-Patches/0048-Firework-Meta-Crash-Fix.patch +++ b/CraftBukkit-Patches/0047-Firework-Meta-Crash-Fix.patch @@ -1,4 +1,4 @@ -From 5045925cd02c861e4c6199c0d5eb9148c365daba Mon Sep 17 00:00:00 2001 +From 395165e77c0d165c30ffbba7eea45b98d81f4b93 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 15 Jun 2013 21:34:48 +1000 Subject: [PATCH] Firework Meta Crash Fix diff --git a/CraftBukkit-Patches/0049-Do-Not-Search-for-Offline-Players.patch b/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch similarity index 93% rename from CraftBukkit-Patches/0049-Do-Not-Search-for-Offline-Players.patch rename to CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch index 8c94849..e41ab19 100644 --- a/CraftBukkit-Patches/0049-Do-Not-Search-for-Offline-Players.patch +++ b/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch @@ -1,4 +1,4 @@ -From 0ba4e79de49929e8f82c0f42539af7b7333a7e6f Mon Sep 17 00:00:00 2001 +From 86654f9d64ccc6fbefc3b5f7da9fa28b9d43563f Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jun 2013 08:20:26 +1000 Subject: [PATCH] Do Not Search for Offline Players From 3b7adf24b7bbf12e0de41baef3b13768235945c5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:45:10 +1000 Subject: [PATCH 21/40] Rename invalid name filter patch --- ...om-invalid-names.patch => 0033-Filter-Invalid-Names.patch} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename CraftBukkit-Patches/{0033-Prevent-handshake-spam-from-invalid-names.patch => 0033-Filter-Invalid-Names.patch} (90%) diff --git a/CraftBukkit-Patches/0033-Prevent-handshake-spam-from-invalid-names.patch b/CraftBukkit-Patches/0033-Filter-Invalid-Names.patch similarity index 90% rename from CraftBukkit-Patches/0033-Prevent-handshake-spam-from-invalid-names.patch rename to CraftBukkit-Patches/0033-Filter-Invalid-Names.patch index a17b54a..92e5a91 100644 --- a/CraftBukkit-Patches/0033-Prevent-handshake-spam-from-invalid-names.patch +++ b/CraftBukkit-Patches/0033-Filter-Invalid-Names.patch @@ -1,7 +1,7 @@ -From 2fd3ed6ad7d63cdd7ada4ea8a3b3c57e8881e003 Mon Sep 17 00:00:00 2001 +From 47e90e4e5c72a105ff5b9901ef6929ef7511d1fb 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. +Subject: [PATCH] Filter Invalid Names diff --git a/src/main/java/net/minecraft/server/Packet2Handshake.java b/src/main/java/net/minecraft/server/Packet2Handshake.java From eed7b85ce619da91c1f3c211344bf7847d62a7b6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:46:00 +1000 Subject: [PATCH 22/40] Rename close unloaded save files --- ...-Save-Files.patch => 0035-Close-Unloaded-Save-Files.patch} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename CraftBukkit-Patches/{0035-Close-Unloaded-World-s-Save-Files.patch => 0035-Close-Unloaded-Save-Files.patch} (95%) diff --git a/CraftBukkit-Patches/0035-Close-Unloaded-World-s-Save-Files.patch b/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch similarity index 95% rename from CraftBukkit-Patches/0035-Close-Unloaded-World-s-Save-Files.patch rename to CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch index d7a0ffd..ecc6cc0 100644 --- a/CraftBukkit-Patches/0035-Close-Unloaded-World-s-Save-Files.patch +++ b/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch @@ -1,7 +1,7 @@ -From 961f5828c4eff61d46057d9c5da25fbd636a8519 Mon Sep 17 00:00:00 2001 +From 18510e40ca616147f8f9cd5baee7554071122eb9 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Wed, 27 Mar 2013 01:41:54 +0200 -Subject: [PATCH] Close Unloaded World's Save Files +Subject: [PATCH] Close Unloaded Save Files diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java From 4bda2412ce4be6b6fff90ef3d1ca4cc54b66b36b Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:47:12 +1000 Subject: [PATCH 23/40] Rename translation caching patch --- ...aleLanguage.patch => 0036-Cache-Translation-Storage.patch} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename CraftBukkit-Patches/{0036-Optimized-version-of-LocaleLanguage.patch => 0036-Cache-Translation-Storage.patch} (98%) diff --git a/CraftBukkit-Patches/0036-Optimized-version-of-LocaleLanguage.patch b/CraftBukkit-Patches/0036-Cache-Translation-Storage.patch similarity index 98% rename from CraftBukkit-Patches/0036-Optimized-version-of-LocaleLanguage.patch rename to CraftBukkit-Patches/0036-Cache-Translation-Storage.patch index aeb6d69..aa73e59 100644 --- a/CraftBukkit-Patches/0036-Optimized-version-of-LocaleLanguage.patch +++ b/CraftBukkit-Patches/0036-Cache-Translation-Storage.patch @@ -1,7 +1,7 @@ -From d7aef73a55fb697a5609c584f34f684085497fb9 Mon Sep 17 00:00:00 2001 +From c4ca5d2c5867b36a6e203fbf55f741a644ba87c0 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 8 May 2013 12:09:45 +1000 -Subject: [PATCH] Optimized version of LocaleLanguage +Subject: [PATCH] Cache Translation Storage This patch reduces the memory footprint of each EntityPlayer by about 300 KB. The original class looks very unfinished and future versions might use the commented code. From 20051065ad57230a2cfd6e2d2b28ce90131f00d8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:50:04 +1000 Subject: [PATCH 24/40] Rename next tick list performance patch --- ...-.patch => 0037-Improve-NextTickList-Performance.patch} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename CraftBukkit-Patches/{0037-Improve-next-tick-list-performance-on-chunk-unloads-.patch => 0037-Improve-NextTickList-Performance.patch} (98%) diff --git a/CraftBukkit-Patches/0037-Improve-next-tick-list-performance-on-chunk-unloads-.patch b/CraftBukkit-Patches/0037-Improve-NextTickList-Performance.patch similarity index 98% rename from CraftBukkit-Patches/0037-Improve-next-tick-list-performance-on-chunk-unloads-.patch rename to CraftBukkit-Patches/0037-Improve-NextTickList-Performance.patch index 6d90615..3974f36 100644 --- a/CraftBukkit-Patches/0037-Improve-next-tick-list-performance-on-chunk-unloads-.patch +++ b/CraftBukkit-Patches/0037-Improve-NextTickList-Performance.patch @@ -1,9 +1,10 @@ -From 9748c8731abbaeaeef82d6090504516a34b05d88 Mon Sep 17 00:00:00 2001 +From 79812d32f7cfef51de310b72ed9eb59410395573 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Wed, 24 Apr 2013 01:43:33 -0500 -Subject: [PATCH] Improve next-tick-list performance on chunk unloads, large - queues +Subject: [PATCH] Improve NextTickList Performance +Improve next-tick-list performance on chunk unloads, large + queues diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java index 52a70a1..08a4240 100644 From 382b02488892ee8c9659502f6988ef5571ee9a54 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:53:18 +1000 Subject: [PATCH 25/40] Add our enable foreign language in signs patch --- .../0049-Enable-Foreign-Language-Signs.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 CraftBukkit-Patches/0049-Enable-Foreign-Language-Signs.patch diff --git a/CraftBukkit-Patches/0049-Enable-Foreign-Language-Signs.patch b/CraftBukkit-Patches/0049-Enable-Foreign-Language-Signs.patch new file mode 100644 index 0000000..2711c15 --- /dev/null +++ b/CraftBukkit-Patches/0049-Enable-Foreign-Language-Signs.patch @@ -0,0 +1,22 @@ +From ba0018601961308c4c4213daaeef9c23e62ef37f Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Fri, 21 Jun 2013 17:53:03 +1000 +Subject: [PATCH] Enable Foreign Language Signs + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 8deba1b..998ac8d 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -1559,7 +1559,7 @@ public class PlayerConnection extends Connection { + flag = false; + } else { + for (i = 0; i < packet130updatesign.lines[j].length(); ++i) { +- if (SharedConstants.allowedCharacters.indexOf(packet130updatesign.lines[j].charAt(i)) < 0) { ++ if (!SharedConstants.isAllowedChatCharacter(packet130updatesign.lines[j].charAt(i))) { // Spigot + flag = false; + } + } +-- +1.8.1.2 + From 3abc02a4c80916ce9d39afbb237b6aaeb4906789 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:59:37 +1000 Subject: [PATCH 26/40] Add our spam filter exclusions patch --- .../0050-Spam-Filter-Exclusions.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch diff --git a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch new file mode 100644 index 0000000..29b61db --- /dev/null +++ b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch @@ -0,0 +1,41 @@ +From 1911a4552a07b000e685b8c604a9759f130bec1f Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Fri, 21 Jun 2013 17:59:22 +1000 +Subject: [PATCH] Spam Filter Exclusions + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 998ac8d..a292c1a 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -846,7 +846,8 @@ public class PlayerConnection extends Connection { + this.chat(s, packet3chat.a_()); + + // This section stays because it is only applicable to packets +- if (chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam ++ // Spigot - spam exclusions ++ if (!org.spigotmc.SpigotConfig.spamExclusions.contains(s) && chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam + if (packet3chat.a_()) { + Waitable waitable = new Waitable() { + @Override +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index a7a9625..2e9341b 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -180,4 +180,13 @@ public class SpigotConfig + bungeeAddresses = getList( "settings.bungeecord-addresses", bungee ); + bungee = getBoolean( "settings.bungeecord", true ); + } ++ ++ public static List spamExclusions; ++ private void spamExclusions() ++ { ++ spamExclusions = getList( "commands.spam-exclusions", Arrays.asList( new String[] ++ { ++ "/skill" ++ } ) ); ++ } + } +-- +1.8.1.2 + From 3fbe05803351b4b652490a01b394c85fc403811f Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:01:41 +1000 Subject: [PATCH 27/40] Add our command logging disable patch --- ...1-Allow-Disabling-of-Command-Logging.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch diff --git a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch new file mode 100644 index 0000000..033b9e1 --- /dev/null +++ b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch @@ -0,0 +1,42 @@ +From b67a84c4c41e1a1e5cf4b70f70d67625ed5c869c Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Fri, 21 Jun 2013 18:01:29 +1000 +Subject: [PATCH] Allow Disabling of Command Logging + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index a292c1a..0e8d292 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -970,7 +970,12 @@ public class PlayerConnection extends Connection { + } + + try { +- this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // CraftBukkit ++ // Spigot Start ++ if ( org.spigotmc.SpigotConfig.logCommands ) ++ { ++ this.minecraftServer.getLogger().info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // CraftBukkit ++ } ++ // Spigot end + if (this.server.dispatchCommand(event.getPlayer(), event.getMessage().substring(1))) { + org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot + return; +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index 2e9341b..b283c7d 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -189,4 +189,10 @@ public class SpigotConfig + "/skill" + } ) ); + } ++ ++ public static boolean logCommands; ++ private void logCommands() ++ { ++ logCommands = getBoolean( "commands.log", true ); ++ } + } +-- +1.8.1.2 + From 619e56409308bab37c78a3935e854ec99fd39358 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:06:04 +1000 Subject: [PATCH 28/40] Add our tab complete patch back --- ...low-Disabling-of-Command-TabComplete.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch diff --git a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch new file mode 100644 index 0000000..03392dd --- /dev/null +++ b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch @@ -0,0 +1,37 @@ +From 958e2c8da37c37b1aab8a7875c609ee878e28bcf Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Fri, 21 Jun 2013 18:05:54 +1000 +Subject: [PATCH] Allow Disabling of Command TabComplete + + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 8990b9f..f41d740 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -1352,7 +1352,7 @@ public final class CraftServer implements Server { + public List tabCompleteCommand(Player player, String message) { + List completions = null; + try { +- completions = getCommandMap().tabComplete(player, message.substring(1)); ++ completions = (org.spigotmc.SpigotConfig.tabComplete) ? getCommandMap().tabComplete(player, message.substring(1)) : null; + } catch (CommandException ex) { + player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); + getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index b283c7d..56012e1 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -195,4 +195,10 @@ public class SpigotConfig + { + logCommands = getBoolean( "commands.log", true ); + } ++ ++ public static boolean tabComplete; ++ private void tabComplete() ++ { ++ tabComplete = getBoolean( "commands.tab-complete", true ); ++ } + } +-- +1.8.1.2 + From 1d3a0f7488a4ca4291ceec99362ef739636b3c56 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:14:27 +1000 Subject: [PATCH 29/40] Reload support for spigot.yml --- .../0004-Spigot-Configuration.patch | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 49e1959..7ce03b8 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,4 +1,4 @@ -From ba981dd9b929cf59480d214ed9de8cd79c3bdbbc Mon Sep 17 00:00:00 2001 +From c1770b3e3510e19c075d5e21902fe348b73508fb Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 17:35:57 +1000 Subject: [PATCH] Spigot Configuration @@ -36,6 +36,26 @@ index 3a4ddea..de052bd 100644 this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 00326c1..814baa1 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -556,6 +556,7 @@ public final class CraftServer implements Server { + playerList.getIPBans().load(); + playerList.getNameBans().load(); + ++ org.spigotmc.SpigotConfig.init(); // Spigot + for (WorldServer world : console.worlds) { + world.difficulty = difficulty; + world.setSpawnFlags(monsters, animals); +@@ -570,6 +571,7 @@ public final class CraftServer implements Server { + } else { + world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns(); + } ++ world.spigotConfig.init(); // Spigot + } + + pluginManager.clearPlugins(); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 index 0000000..43d94fe @@ -142,10 +162,10 @@ index 0000000..43d94fe +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java new file mode 100644 -index 0000000..facea4f +index 0000000..78a7573 --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -0,0 +1,63 @@ +@@ -0,0 +1,68 @@ +package org.spigotmc; + +import java.util.List; @@ -157,18 +177,23 @@ index 0000000..facea4f + + private final String worldName; + private final YamlConfiguration config; -+ private final boolean verbose; ++ private boolean verbose; + + public SpigotWorldConfig(String worldName) + { + this.worldName = worldName; + this.config = SpigotConfig.config; ++ init(); ++ } ++ ++ public void init() ++ { + this.verbose = getBoolean( "verbose", true ); + + log( "-------------- Spigot ----------------" ); + log( "-------- World Settings For [" + worldName + "] --------" ); -+ log( "-------------------------------------------------" ); + SpigotConfig.readConfig( SpigotWorldConfig.class, this ); ++ log( "-------------------------------------------------" ); + } + + private void log(String s) @@ -188,7 +213,7 @@ index 0000000..facea4f + private double getDouble(String path, double def) + { + config.addDefault( "world-settings.default." + path, def ); -+ return config.getDouble("world-settings." + worldName + "." + path, config.getDouble("world-settings.default." + path ) ); ++ return config.getDouble( "world-settings." + worldName + "." + path, config.getDouble( "world-settings.default." + path ) ); + } + + private int getInt(String path, int def) From 257cc9648dd3b4a50b57299f80e66c8991023651 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:21:29 +1000 Subject: [PATCH 30/40] Add ability to register commands --- .../0004-Spigot-Configuration.patch | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 7ce03b8..012e0be 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,4 +1,4 @@ -From c1770b3e3510e19c075d5e21902fe348b73508fb Mon Sep 17 00:00:00 2001 +From c623ae16ce7c29abf83a755cff088df3542e73a0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 17:35:57 +1000 Subject: [PATCH] Spigot Configuration @@ -37,9 +37,18 @@ index 3a4ddea..de052bd 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 00326c1..814baa1 100644 +index 00326c1..92c6c88 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -213,7 +213,7 @@ public final class CraftServer implements Server { + updater.getOnBroken().addAll(configuration.getStringList("auto-updater.on-broken")); + updater.getOnUpdate().addAll(configuration.getStringList("auto-updater.on-update")); + updater.check(serverVersion); +- ++ org.spigotmc.SpigotConfig.registerCommands( commandMap ); // Spigot + loadPlugins(); + enablePlugins(PluginLoadOrder.STARTUP); + } @@ -556,6 +556,7 @@ public final class CraftServer implements Server { playerList.getIPBans().load(); playerList.getNameBans().load(); @@ -48,7 +57,7 @@ index 00326c1..814baa1 100644 for (WorldServer world : console.worlds) { world.difficulty = difficulty; world.setSpawnFlags(monsters, animals); -@@ -570,6 +571,7 @@ public final class CraftServer implements Server { +@@ -570,12 +571,14 @@ public final class CraftServer implements Server { } else { world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns(); } @@ -56,12 +65,19 @@ index 00326c1..814baa1 100644 } pluginManager.clearPlugins(); + commandMap.clearCommands(); + resetRecipes(); + ++ org.spigotmc.SpigotConfig.registerCommands( commandMap ); // Spigot + int pollCount = 0; + + // Wait for at most 2.5 seconds for plugins to close their threads diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..43d94fe +index 0000000..933500d --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -0,0 +1,98 @@ +@@ -0,0 +1,113 @@ +package org.spigotmc; + +import com.google.common.base.Throwables; @@ -70,9 +86,13 @@ index 0000000..43d94fe +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; ++import java.util.HashMap; +import java.util.List; ++import java.util.Map; +import java.util.logging.Level; +import org.bukkit.Bukkit; ++import org.bukkit.command.Command; ++import org.bukkit.command.SimpleCommandMap; +import org.bukkit.configuration.file.YamlConfiguration; + +public class SpigotConfig @@ -93,6 +113,7 @@ index 0000000..43d94fe + /*========================================================================*/ + static YamlConfiguration config; + static int version; ++ static Map commands; + /*========================================================================*/ + + public static void init() @@ -101,10 +122,20 @@ index 0000000..43d94fe + config.options().header( HEADER ); + config.options().copyDefaults( true ); + ++ commands = new HashMap(); ++ + version = getInt( "config-version", 1 ); + readConfig( SpigotConfig.class, null ); + } + ++ public static void registerCommands(SimpleCommandMap commandMap) ++ { ++ for ( Map.Entry entry : commands.entrySet() ) ++ { ++ commandMap.register( entry.getKey(), "Spigot", entry.getValue() ); ++ } ++ } ++ + static void readConfig(Class clazz, Object instance) + { + for ( Method method : SpigotConfig.class.getDeclaredMethods() ) From 2b3dc8d5a80b3b8ba7df1ea344a0a43e38f5c2a5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:25:45 +1000 Subject: [PATCH 31/40] *wipes sweat off brow, add /tps and /restart commands --- .../0005-Better-Chunk-Tick-Selection.patch | 6 +- .../0006-Crop-Growth-Rates.patch | 6 +- .../0009-Proxy-IP-Filter.patch | 6 +- .../0010-Merge-tweaks-and-configuration.patch | 6 +- CraftBukkit-Patches/0013-View-Distance.patch | 6 +- .../0017-Highly-Optimized-Tick-Loop.patch | 24 ++++++- CraftBukkit-Patches/0019-Orebfuscator.patch | 6 +- ...b-Spawning-Relative-to-View-Distance.patch | 6 +- .../0022-Entity-Activation-Range.patch | 6 +- CraftBukkit-Patches/0023-Metrics.patch | 12 ++-- .../0024-Watchdog-Thread.patch | 9 +-- CraftBukkit-Patches/0025-Netty.patch | 64 +++---------------- .../0029-Entity-Tracking-Ranges.patch | 6 +- .../0030-BungeeCord-Support.patch | 6 +- .../0035-Close-Unloaded-Save-Files.patch | 6 +- .../0044-Hopper-Cooldowns.patch | 6 +- ...48-Do-Not-Search-for-Offline-Players.patch | 6 +- .../0050-Spam-Filter-Exclusions.patch | 6 +- ...1-Allow-Disabling-of-Command-Logging.patch | 6 +- ...low-Disabling-of-Command-TabComplete.patch | 10 +-- 20 files changed, 94 insertions(+), 115 deletions(-) diff --git a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch index 9db5f8e..020e763 100644 --- a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch +++ b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch @@ -1,4 +1,4 @@ -From 0f73824e729e0ec4ea129df7f583f6183600a79d Mon Sep 17 00:00:00 2001 +From 2a6d2a8feddce00e9d66e2b17088e84b54748fd7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:56:02 +1000 Subject: [PATCH] Better Chunk Tick Selection @@ -148,10 +148,10 @@ index 49360c1..6c3fcf1 100644 } } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 6642e86..2b77e04 100644 +index 78a7573..1a13e18 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -60,4 +60,11 @@ public class SpigotWorldConfig +@@ -65,4 +65,11 @@ public class SpigotWorldConfig config.addDefault( "world-settings.default." + path, def ); return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); } diff --git a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch index ab0ad05..d3e7056 100644 --- a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch +++ b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch @@ -1,4 +1,4 @@ -From 1dd2846a5baeca5b402c2ed8c154eb305670189d Mon Sep 17 00:00:00 2001 +From f7f5efd1e09e9ec6ff47206b21e2baff2aba71b0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:17:20 +1000 Subject: [PATCH] Crop Growth Rates @@ -132,10 +132,10 @@ index 8339a35..c7e2344 100644 if (l < 7) { diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 2b77e04..fcc2c88 100644 +index 1a13e18..17b43c1 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -67,4 +67,36 @@ public class SpigotWorldConfig +@@ -72,4 +72,36 @@ public class SpigotWorldConfig chunksPerTick = getInt( "chunks-per-tick", 650 ); log( "Chunks to Grow per Tick: " + chunksPerTick ); } diff --git a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch index ffab132..7988d23 100644 --- a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch +++ b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch @@ -1,4 +1,4 @@ -From 7b5dea06abdd8821b9eae340a8168cfb47ef43d8 Mon Sep 17 00:00:00 2001 +From a26c2eedc264aed6e095e02b5db0e497e7efccee Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:22:07 +1000 Subject: [PATCH] Proxy IP Filter @@ -67,10 +67,10 @@ index 0000000..55d8d12 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index bf297bc..342d883 100644 +index 933500d..cbd05af 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -95,4 +95,10 @@ public class SpigotConfig +@@ -110,4 +110,10 @@ public class SpigotConfig config.addDefault( path, def ); return config.getString( path, config.getString( path ) ); } diff --git a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch index 39e88c1..1a2c471 100644 --- a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch +++ b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch @@ -1,4 +1,4 @@ -From b7bcbfba58901386aae82eb079dafc7d2bb6f17f Mon Sep 17 00:00:00 2001 +From dc6b4cae56006f9b5cc4a041d832d0bc314e3c16 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 @@ -69,10 +69,10 @@ index afe3e4d..97da2cd 100644 if (event != null && (event.isCancelled() || entity.dead)) { entity.dead = true; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index fcc2c88..58406e5 100644 +index 17b43c1..705ee2e 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -99,4 +99,18 @@ public class SpigotWorldConfig +@@ -104,4 +104,18 @@ public class SpigotWorldConfig wheatModifier = getInt( "growth.wheat-modifier", 100 ); log( "Cactus Growth Modifier: " + cactusModifier + "%" ); } diff --git a/CraftBukkit-Patches/0013-View-Distance.patch b/CraftBukkit-Patches/0013-View-Distance.patch index 03bd7ee..6db218a 100644 --- a/CraftBukkit-Patches/0013-View-Distance.patch +++ b/CraftBukkit-Patches/0013-View-Distance.patch @@ -1,4 +1,4 @@ -From ee35f397d1f01892ef579716909a6a61f8e55937 Mon Sep 17 00:00:00 2001 +From 054568f23c2021036cef88d2d9ff41f086dba1a1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:52:41 +1100 Subject: [PATCH] View Distance @@ -32,10 +32,10 @@ index 6c3fcf1..614a17f 100644 this.entitiesById = new IntHashMap(); } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 58406e5..c56b3e0 100644 +index 705ee2e..d7e9794 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -113,4 +113,11 @@ public class SpigotWorldConfig +@@ -118,4 +118,11 @@ public class SpigotWorldConfig expMerge = getDouble("merge-radius.exp", 3.0 ); log( "Experience Merge Radius: " + expMerge ); } diff --git a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch index 925b62e..92d05d2 100644 --- a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch @@ -1,4 +1,4 @@ -From 47772fc5f951855c7814afa967489d5ce454554a Mon Sep 17 00:00:00 2001 +From 6468eb8fe73a0cd8b584dac5bdce503608a035dd Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 12:28:17 +1100 Subject: [PATCH] Highly Optimized Tick Loop @@ -116,6 +116,28 @@ index 0000000..f114a31 + return true; + } +} +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index cbd05af..3bd93ad 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -14,6 +14,7 @@ import org.bukkit.Bukkit; + import org.bukkit.command.Command; + import org.bukkit.command.SimpleCommandMap; + import org.bukkit.configuration.file.YamlConfiguration; ++import org.bukkit.craftbukkit.command.TicksPerSecondCommand; + + public class SpigotConfig + { +@@ -116,4 +117,9 @@ public class SpigotConfig + { + preventProxies = getBoolean( "settings.prevent-proxies", false ); + } ++ ++ private void tpsCommand() ++ { ++ commands.put( "tps", new TicksPerSecondCommand( "tps" ) ); ++ } + } -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0019-Orebfuscator.patch b/CraftBukkit-Patches/0019-Orebfuscator.patch index 748a288..2ae0be0 100644 --- a/CraftBukkit-Patches/0019-Orebfuscator.patch +++ b/CraftBukkit-Patches/0019-Orebfuscator.patch @@ -1,4 +1,4 @@ -From ce0f33c8af5d3b5fcb21e1dff0808d39c4b3b180 Mon Sep 17 00:00:00 2001 +From f9b52ad834a62522ab547a804d3039c43ed2a9f8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator @@ -316,7 +316,7 @@ index 0000000..74ee741 + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index c56b3e0..5e1cfa9 100644 +index d7e9794..660c660 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -1,5 +1,6 @@ @@ -326,7 +326,7 @@ index c56b3e0..5e1cfa9 100644 import java.util.List; import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; -@@ -120,4 +121,25 @@ public class SpigotWorldConfig +@@ -125,4 +126,25 @@ public class SpigotWorldConfig viewDistance = getInt( "view-distance", Bukkit.getViewDistance() ); log( "View Distance: " + viewDistance ); } diff --git a/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch index 13da4c0..a49e84b 100644 --- a/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch +++ b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch @@ -1,4 +1,4 @@ -From 0ad89ba769c9c32aa1fe9b2174a80077cbf42ef1 Mon Sep 17 00:00:00 2001 +From 3e1f376bdd56f8214943d4cd50fec60d4afab2ee Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:29:54 +1000 Subject: [PATCH] Fix Mob Spawning Relative to View Distance @@ -121,10 +121,10 @@ index 056100f..bec0d91 100644 continue label110; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index eac85fc..6db43d8 100644 +index 660c660..81db826 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -142,4 +142,11 @@ public class SpigotWorldConfig +@@ -147,4 +147,11 @@ public class SpigotWorldConfig antiXrayInstance = new AntiXray( this ); } diff --git a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch index 0418174..178ecdf 100644 --- a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From 3e2225679ce7bb228ae9527d4cae18bc1523e92d Mon Sep 17 00:00:00 2001 +From e40f1e3ad3bb6f8ce6262dba58e92764f50dfb4b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -462,10 +462,10 @@ index 0000000..93ce20e + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 6db43d8..494a94e 100644 +index 81db826..263bc15 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -149,4 +149,15 @@ public class SpigotWorldConfig +@@ -154,4 +154,15 @@ public class SpigotWorldConfig mobSpawnRange = (byte) getInt( "mob-spawn-range", 4 ); log( "Mob Spawn Range: " + mobSpawnRange ); } diff --git a/CraftBukkit-Patches/0023-Metrics.patch b/CraftBukkit-Patches/0023-Metrics.patch index 0622af4..5f916c2 100644 --- a/CraftBukkit-Patches/0023-Metrics.patch +++ b/CraftBukkit-Patches/0023-Metrics.patch @@ -1,4 +1,4 @@ -From de751bfcb848c186b0d2899a659ad39404b4ef81 Mon Sep 17 00:00:00 2001 +From 0bc162abd73017c3eb6941612ef4e2669dcf65c5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 08:58:35 +1100 Subject: [PATCH] Metrics @@ -657,18 +657,18 @@ index 0000000..f1690a2 +} \ No newline at end of file diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index e84372d..8711c7a 100644 +index 3bd93ad..7825cfc 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -30,6 +30,7 @@ public class SpigotConfig - static YamlConfiguration config; +@@ -36,6 +36,7 @@ public class SpigotConfig static int version; + static Map commands; /*========================================================================*/ + private static Metrics metrics; public static void init() { -@@ -39,6 +40,18 @@ public class SpigotConfig +@@ -47,6 +48,18 @@ public class SpigotConfig version = getInt( "config-version", 1 ); readConfig( SpigotConfig.class, null ); @@ -686,7 +686,7 @@ index e84372d..8711c7a 100644 + } } - static void readConfig(Class clazz, Object instance) + public static void registerCommands(SimpleCommandMap commandMap) -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0024-Watchdog-Thread.patch b/CraftBukkit-Patches/0024-Watchdog-Thread.patch index 0c3cfc2..b90bafb 100644 --- a/CraftBukkit-Patches/0024-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0024-Watchdog-Thread.patch @@ -1,4 +1,4 @@ -From 21f77e26c9c80277b474d950860e63a27b0fd8f1 Mon Sep 17 00:00:00 2001 +From 6b299bce7cd7b47541e5c780e09555b8e2fed3ff Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 12:33:20 +1100 Subject: [PATCH] Watchdog Thread. @@ -142,12 +142,12 @@ index 0000000..a5c4549 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index b5f3532..89b2927 100644 +index 7825cfc..af567ac 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -114,4 +114,15 @@ public class SpigotConfig +@@ -135,4 +135,16 @@ public class SpigotConfig { - preventProxies = getBoolean( "settings.prevent-proxies", false ); + commands.put( "tps", new TicksPerSecondCommand( "tps" ) ); } + + public static int timeoutTime = 60; @@ -158,6 +158,7 @@ index b5f3532..89b2927 100644 + timeoutTime = getInt( "settings.timeout-time", timeoutTime ); + restartOnCrash = getBoolean( "settings.restart-on-crash", restartOnCrash ); + restartScript = getString( "settings.restart-script", restartScript ); ++ commands.put( "restart", new RestartCommand( "restart" ) ); + WatchdogThread.doStart( timeoutTime, restartOnCrash ); + } } diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index c587d1b..69641ea 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,35 +1,8 @@ -From 3a9c5ddf9b383449f2de17e827cccf88fe430f7d Mon Sep 17 00:00:00 2001 +From 1de426d2cd4da44ab5a22aca56f2eceac874d2eb Mon Sep 17 00:00:00 2001 From: md_5 -Date: Tue, 23 Apr 2013 11:47:32 +1000 +Date: Fri, 21 Jun 2013 18:23:00 +1000 Subject: [PATCH] Netty - Implement an uber efficient network engine based on the - Java NIO framework Netty. This is basically a complete rewrite of the - Minecraft network engine with many distinct advantages. First and foremost, - there will no longer be the horrid, and redundant case of 2, or even at - times, 3 threads per a connection. Instead low level select/epoll based NIO - is used. The number of threads used for network reading and writing will - scale automatically to the number of cores for use on your server. In most - cases this will be around 8 threads for a 4 core server, much better than the - up to 1000 threads that could be in use at one time with the old engine. To - facilitate asynchronous packet sending or receiving (currently only chat), a - thread pool of 16 threads is kept handy. == Plugin incompatibilities As a - side effect of this change, plugins which rely on very specific - implementation level details within Minecraft are broken. At this point in - time, TagAPI and ProtocolLib are affected. If you are a user of ProtocolLib - you are advised to update to the latest build, where full support is enabled. - If you are a user of TagAPI, support has not yet been added, so you will need - to install the updated ProtocolLib so that TagAPI may use its functions. == - Stability The code within this commit has been very lightly tested in - production (300 players for approximately 24 hours), however it is not - guaranteed to be free from all bugs. If you experence weird connection - behaviour, reporting the bug and steps to reproduce are advised. You are also - free to downgrade to the latest recommend build, which is guaranteed to be - stable. == Summary This commit provides a reduction in threads, which gives - the CPU / operating system more time to allocate to the main server threads, - as well as various other side benefits such as chat thread pooling and a - slight reduction in latency. This commit is licensed under the Creative - Commons Attribution-ShareAlike 3.0 Unported license. diff --git a/pom.xml b/pom.xml index 8c9f66b..a33020e 100644 @@ -210,10 +183,10 @@ index 17cfacc..a945892 100644 this.b = true; } catch (Exception exception) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 00326c1..c18e5e3 100644 +index 92c6c88..796085d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1366,4 +1366,20 @@ public final class CraftServer implements Server { +@@ -1369,4 +1369,20 @@ public final class CraftServer implements Server { public CraftScoreboardManager getScoreboardManager() { return scoreboardManager; } @@ -377,23 +350,20 @@ index 0000000..386c2f8 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 6e8bae8..5686c41 100644 +index af567ac..8d59e39 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -6,7 +6,11 @@ import java.io.IOException; +@@ -6,6 +6,8 @@ import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.Collections; -+import java.util.HashMap; + import java.util.HashMap; import java.util.List; -+import java.util.Map; - import java.util.logging.Level; - import org.bukkit.Bukkit; - import org.bukkit.configuration.file.YamlConfiguration; -@@ -125,4 +129,44 @@ public class SpigotConfig - restartScript = getString( "settings.restart-script", restartScript ); + import java.util.Map; +@@ -147,4 +149,44 @@ public class SpigotConfig + commands.put( "restart", new RestartCommand( "restart" ) ); WatchdogThread.doStart( timeoutTime, restartOnCrash ); } + @@ -1570,20 +1540,6 @@ index 0000000..d3a9cab + */ + DATA; +} -diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml -index 61a95e3..e65758d 100644 ---- a/src/main/resources/configurations/bukkit.yml -+++ b/src/main/resources/configurations/bukkit.yml -@@ -13,6 +13,9 @@ - # Bug tracker: http://leaky.bukkit.org/ - - -+#listeners: -+# - address: 127.0.0.1 -+# port: 25577 - settings: - allow-end: true - warn-on-overload: true -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch index dfcc5d6..da4ca3a 100644 --- a/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch +++ b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch @@ -1,4 +1,4 @@ -From 909c3ed4c89b1a12496686b431ba74c1deb28c9c Mon Sep 17 00:00:00 2001 +From aa295927ecd733806da255f2e88f48d8b66e3cdd Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Feb 2013 11:58:47 -0500 Subject: [PATCH] Entity Tracking Ranges @@ -24,10 +24,10 @@ index d7efe3e..59586c2 100644 i = this.d; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index c567250..de052ad 100644 +index 263bc15..c7ccbce 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -160,4 +160,19 @@ public class SpigotWorldConfig +@@ -165,4 +165,19 @@ public class SpigotWorldConfig miscActivationRange = getInt( "entity-activation-range.misc", miscActivationRange ); log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Mi " + miscActivationRange ); } diff --git a/CraftBukkit-Patches/0030-BungeeCord-Support.patch b/CraftBukkit-Patches/0030-BungeeCord-Support.patch index f1221a2..a1aa9a3 100644 --- a/CraftBukkit-Patches/0030-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0030-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From c2e3bc388c9aa440a90d0fff23131900c434a23c Mon Sep 17 00:00:00 2001 +From 1b2363993453160576da3b0ec93eeb951a30e3bb Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -75,7 +75,7 @@ index 7cae665..21141f2 100644 public Spigot spigot() diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 5686c41..952c0ab 100644 +index 8d59e39..d882808 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -7,6 +7,7 @@ import java.lang.reflect.InvocationTargetException; @@ -86,7 +86,7 @@ index 5686c41..952c0ab 100644 import java.util.Collections; import java.util.HashMap; import java.util.List; -@@ -169,4 +170,14 @@ public class SpigotConfig +@@ -189,4 +190,14 @@ public class SpigotConfig this.listeners.add( new Listener( host, port, netty, connectionThrottle ) ); } } diff --git a/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch b/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch index ecc6cc0..8dc2b40 100644 --- a/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch +++ b/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch @@ -1,4 +1,4 @@ -From 18510e40ca616147f8f9cd5baee7554071122eb9 Mon Sep 17 00:00:00 2001 +From f812ee46c14a5b41054d533ee5727427e75d9a93 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Wed, 27 Mar 2013 01:41:54 +0200 Subject: [PATCH] Close Unloaded Save Files @@ -18,7 +18,7 @@ index 900ed68..829f4a3 100644 public static synchronized RegionFile a(File file1, int i, int j) { File file2 = new File(file1, "region"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c18e5e3..b32f6f1 100644 +index 796085d..8746776 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -37,6 +37,8 @@ import net.minecraft.server.MinecraftServer; @@ -30,7 +30,7 @@ index c18e5e3..b32f6f1 100644 import net.minecraft.server.ServerNBTManager; import net.minecraft.server.WorldLoaderServer; import net.minecraft.server.WorldManager; -@@ -808,6 +810,30 @@ public final class CraftServer implements Server { +@@ -811,6 +813,30 @@ public final class CraftServer implements Server { worlds.remove(world.getName().toLowerCase()); console.worlds.remove(console.worlds.indexOf(handle)); diff --git a/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch b/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch index 3681ae3..a6c1946 100644 --- a/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch +++ b/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch @@ -1,4 +1,4 @@ -From 4a2de4a9743e9e7b558366b8128dae5fd4cb3e0d Mon Sep 17 00:00:00 2001 +From 5f0677ff55d769c9cc1b2db56fe190f422c71b8b Mon Sep 17 00:00:00 2001 From: DerFlash Date: Sun, 2 Jun 2013 16:23:46 +1000 Subject: [PATCH] Hopper Cooldowns @@ -64,10 +64,10 @@ index f6d269d..1f69c7b 100644 iinventory.update(); diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 87d3b6e..0a30d4c 100644 +index c7ccbce..da5f510 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -175,4 +175,13 @@ public class SpigotWorldConfig +@@ -180,4 +180,13 @@ public class SpigotWorldConfig maxTrackingRange = getInt( "entity-tracking-range.other", maxTrackingRange ); log( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Other " + maxTrackingRange ); } diff --git a/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch b/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch index e41ab19..e1e672c 100644 --- a/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch +++ b/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch @@ -1,4 +1,4 @@ -From 86654f9d64ccc6fbefc3b5f7da9fa28b9d43563f Mon Sep 17 00:00:00 2001 +From 834d61d921f90d20f1d92e7ae5768b2c089996df Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jun 2013 08:20:26 +1000 Subject: [PATCH] Do Not Search for Offline Players @@ -6,10 +6,10 @@ Subject: [PATCH] Do Not Search for Offline Players By default we do not want to search as this leads to massive load times for plugins wanting to do mass data lookups. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b32f6f1..8990b9f 100644 +index 8746776..be832ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1085,7 +1085,7 @@ public final class CraftServer implements Server { +@@ -1088,7 +1088,7 @@ public final class CraftServer implements Server { } public OfflinePlayer getOfflinePlayer(String name) { diff --git a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch index 29b61db..490a1d7 100644 --- a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch +++ b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch @@ -1,4 +1,4 @@ -From 1911a4552a07b000e685b8c604a9759f130bec1f Mon Sep 17 00:00:00 2001 +From 8ca478a5293b028b7bbec22ffc24b4465661b5a2 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:59:22 +1000 Subject: [PATCH] Spam Filter Exclusions @@ -19,10 +19,10 @@ index 998ac8d..a292c1a 100644 Waitable waitable = new Waitable() { @Override diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index a7a9625..2e9341b 100644 +index d882808..3918325 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -180,4 +180,13 @@ public class SpigotConfig +@@ -200,4 +200,13 @@ public class SpigotConfig bungeeAddresses = getList( "settings.bungeecord-addresses", bungee ); bungee = getBoolean( "settings.bungeecord", true ); } diff --git a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch index 033b9e1..c0b711e 100644 --- a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch +++ b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch @@ -1,4 +1,4 @@ -From b67a84c4c41e1a1e5cf4b70f70d67625ed5c869c Mon Sep 17 00:00:00 2001 +From 34058c02181ad2cf992b6fc702b80d6d47a9ed26 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:01:29 +1000 Subject: [PATCH] Allow Disabling of Command Logging @@ -23,10 +23,10 @@ index a292c1a..0e8d292 100644 org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot return; diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 2e9341b..b283c7d 100644 +index 3918325..1329712 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -189,4 +189,10 @@ public class SpigotConfig +@@ -209,4 +209,10 @@ public class SpigotConfig "/skill" } ) ); } diff --git a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch index 03392dd..0e3751d 100644 --- a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch +++ b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch @@ -1,14 +1,14 @@ -From 958e2c8da37c37b1aab8a7875c609ee878e28bcf Mon Sep 17 00:00:00 2001 +From 0a5f04dd779fd13b8ba468eb224b0a3a44596ecf Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:05:54 +1000 Subject: [PATCH] Allow Disabling of Command TabComplete diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8990b9f..f41d740 100644 +index be832ac..3fa8dbe 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1352,7 +1352,7 @@ public final class CraftServer implements Server { +@@ -1355,7 +1355,7 @@ public final class CraftServer implements Server { public List tabCompleteCommand(Player player, String message) { List completions = null; try { @@ -18,10 +18,10 @@ index 8990b9f..f41d740 100644 player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index b283c7d..56012e1 100644 +index 1329712..55f11a0 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -195,4 +195,10 @@ public class SpigotConfig +@@ -215,4 +215,10 @@ public class SpigotConfig { logCommands = getBoolean( "commands.log", true ); } From 1e51504654e588e37e07d26c282b92c45783395d Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:57:20 +1000 Subject: [PATCH 32/40] More static please --- CraftBukkit-Patches/0004-Spigot-Configuration.patch | 6 +++--- CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch | 6 +++--- CraftBukkit-Patches/0025-Netty.patch | 8 ++++---- CraftBukkit-Patches/0030-BungeeCord-Support.patch | 8 ++++---- CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch | 6 +++--- .../0051-Allow-Disabling-of-Command-Logging.patch | 6 +++--- .../0052-Allow-Disabling-of-Command-TabComplete.patch | 6 +++--- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 012e0be..32fcc91 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,4 +1,4 @@ -From c623ae16ce7c29abf83a755cff088df3542e73a0 Mon Sep 17 00:00:00 2001 +From 2a46e61b8c7c63a3940bc25f28203b159bbb7c1c Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 20 Jun 2013 17:35:57 +1000 Subject: [PATCH] Spigot Configuration @@ -74,7 +74,7 @@ index 00326c1..92c6c88 100644 // Wait for at most 2.5 seconds for plugins to close their threads diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..933500d +index 0000000..629224d --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +1,113 @@ @@ -179,7 +179,7 @@ index 0000000..933500d + return config.getInt( path, config.getInt( path ) ); + } + -+ private List getList(String path, T def) ++ private static List getList(String path, T def) + { + config.addDefault( path, def ); + return (List) config.getList( path, config.getList( path ) ); diff --git a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch index 92d05d2..50c15ac 100644 --- a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch @@ -1,4 +1,4 @@ -From 6468eb8fe73a0cd8b584dac5bdce503608a035dd Mon Sep 17 00:00:00 2001 +From 80ac53c4030eb0a997b72702ce1941afa0907af1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 12:28:17 +1100 Subject: [PATCH] Highly Optimized Tick Loop @@ -117,7 +117,7 @@ index 0000000..f114a31 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index cbd05af..3bd93ad 100644 +index 81f956c..ec613e3 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -14,6 +14,7 @@ import org.bukkit.Bukkit; @@ -133,7 +133,7 @@ index cbd05af..3bd93ad 100644 preventProxies = getBoolean( "settings.prevent-proxies", false ); } + -+ private void tpsCommand() ++ private static void tpsCommand() + { + commands.put( "tps", new TicksPerSecondCommand( "tps" ) ); + } diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index 69641ea..921fe90 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,4 +1,4 @@ -From 1de426d2cd4da44ab5a22aca56f2eceac874d2eb Mon Sep 17 00:00:00 2001 +From 2a77e3a6d1b400f134c1a2dec60cc503be2b9332 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:23:00 +1000 Subject: [PATCH] Netty @@ -350,7 +350,7 @@ index 0000000..386c2f8 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index af567ac..8d59e39 100644 +index 378739e..263cb82 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -6,6 +6,8 @@ import java.io.IOException; @@ -384,7 +384,7 @@ index af567ac..8d59e39 100644 + } + } + public static List listeners = new ArrayList(); -+ private void listeners() ++ private static void listeners() + { + Map def = new HashMap(); + def.put( "host", "default" ); @@ -403,7 +403,7 @@ index af567ac..8d59e39 100644 + int port = ( info.get( "port" ) instanceof Integer ) ? (Integer) info.get( "port" ) : Bukkit.getPort(); + boolean netty = (Boolean) info.get( "netty" ); + long connectionThrottle = ( info.get( "throttle" ) instanceof Number ) ? ( (Number) info.get( "throttle" ) ).longValue() : Bukkit.getConnectionThrottle(); -+ this.listeners.add( new Listener( host, port, netty, connectionThrottle ) ); ++ listeners.add( new Listener( host, port, netty, connectionThrottle ) ); + } + } } diff --git a/CraftBukkit-Patches/0030-BungeeCord-Support.patch b/CraftBukkit-Patches/0030-BungeeCord-Support.patch index a1aa9a3..84a926b 100644 --- a/CraftBukkit-Patches/0030-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0030-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From 1b2363993453160576da3b0ec93eeb951a30e3bb Mon Sep 17 00:00:00 2001 +From acf178a300ecdb3581ae80151abb9bcc7c396f5d Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -75,7 +75,7 @@ index 7cae665..21141f2 100644 public Spigot spigot() diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 8d59e39..d882808 100644 +index 263cb82..14a980b 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -7,6 +7,7 @@ import java.lang.reflect.InvocationTargetException; @@ -87,7 +87,7 @@ index 8d59e39..d882808 100644 import java.util.HashMap; import java.util.List; @@ -189,4 +190,14 @@ public class SpigotConfig - this.listeners.add( new Listener( host, port, netty, connectionThrottle ) ); + listeners.add( new Listener( host, port, netty, connectionThrottle ) ); } } + public static List bungeeAddresses = Arrays.asList( new String[] @@ -95,7 +95,7 @@ index 8d59e39..d882808 100644 + "127.0.0.1" + } ); + public static boolean bungee = true; -+ private void bungee() ++ private static void bungee() + { + bungeeAddresses = getList( "settings.bungeecord-addresses", bungee ); + bungee = getBoolean( "settings.bungeecord", true ); diff --git a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch index 490a1d7..e379d20 100644 --- a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch +++ b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch @@ -1,4 +1,4 @@ -From 8ca478a5293b028b7bbec22ffc24b4465661b5a2 Mon Sep 17 00:00:00 2001 +From f87070d3aa96a4d3812eeb10695419ec67bf5c37 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:59:22 +1000 Subject: [PATCH] Spam Filter Exclusions @@ -19,7 +19,7 @@ index 998ac8d..a292c1a 100644 Waitable waitable = new Waitable() { @Override diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index d882808..3918325 100644 +index 14a980b..dd02e84 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -200,4 +200,13 @@ public class SpigotConfig @@ -28,7 +28,7 @@ index d882808..3918325 100644 } + + public static List spamExclusions; -+ private void spamExclusions() ++ private static void spamExclusions() + { + spamExclusions = getList( "commands.spam-exclusions", Arrays.asList( new String[] + { diff --git a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch index c0b711e..095d02f 100644 --- a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch +++ b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch @@ -1,4 +1,4 @@ -From 34058c02181ad2cf992b6fc702b80d6d47a9ed26 Mon Sep 17 00:00:00 2001 +From 6d83cb6ede33f1f2b0e9765270f790bb747f5cd2 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:01:29 +1000 Subject: [PATCH] Allow Disabling of Command Logging @@ -23,7 +23,7 @@ index a292c1a..0e8d292 100644 org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot return; diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 3918325..1329712 100644 +index dd02e84..b3875c1 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -209,4 +209,10 @@ public class SpigotConfig @@ -32,7 +32,7 @@ index 3918325..1329712 100644 } + + public static boolean logCommands; -+ private void logCommands() ++ private static void logCommands() + { + logCommands = getBoolean( "commands.log", true ); + } diff --git a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch index 0e3751d..25db314 100644 --- a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch +++ b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch @@ -1,4 +1,4 @@ -From 0a5f04dd779fd13b8ba468eb224b0a3a44596ecf Mon Sep 17 00:00:00 2001 +From 88294560138502bb818d2678ce19888bae1d2d8b Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:05:54 +1000 Subject: [PATCH] Allow Disabling of Command TabComplete @@ -18,7 +18,7 @@ index be832ac..3fa8dbe 100644 player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 1329712..55f11a0 100644 +index b3875c1..453d0a1 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -215,4 +215,10 @@ public class SpigotConfig @@ -27,7 +27,7 @@ index 1329712..55f11a0 100644 } + + public static boolean tabComplete; -+ private void tabComplete() ++ private static void tabComplete() + { + tabComplete = getBoolean( "commands.tab-complete", true ); + } From 09626243976ffe324a611b3fd6fa0a154640a586 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 19:08:32 +1000 Subject: [PATCH 33/40] Progress on actually getting stuff to load. --- .../0004-Spigot-Configuration.patch | 58 ++++++++++--------- .../0009-Proxy-IP-Filter.patch | 6 +- .../0017-Highly-Optimized-Tick-Loop.patch | 8 +-- CraftBukkit-Patches/0023-Metrics.patch | 16 ++--- .../0024-Watchdog-Thread.patch | 6 +- CraftBukkit-Patches/0025-Netty.patch | 14 ++--- .../0030-BungeeCord-Support.patch | 6 +- .../0035-Close-Unloaded-Save-Files.patch | 6 +- ...48-Do-Not-Search-for-Offline-Players.patch | 6 +- .../0050-Spam-Filter-Exclusions.patch | 6 +- ...1-Allow-Disabling-of-Command-Logging.patch | 6 +- ...low-Disabling-of-Command-TabComplete.patch | 10 ++-- 12 files changed, 75 insertions(+), 73 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 32fcc91..8c58aea 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,21 +1,33 @@ -From 2a46e61b8c7c63a3940bc25f28203b159bbb7c1c Mon Sep 17 00:00:00 2001 +From dc35d23de6e9199f9e1636f0c9e4e44e510513fa Mon Sep 17 00:00:00 2001 From: md_5 -Date: Thu, 20 Jun 2013 17:35:57 +1000 +Date: Fri, 21 Jun 2013 19:06:58 +1000 Subject: [PATCH] Spigot Configuration diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 7261dc9..6668b7e 100644 +index 7261dc9..2d638c0 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -47,6 +47,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - System.setOut(new PrintStream(new LoggerOutputStream(this.getLogger().getLogger(), Level.INFO), true)); - System.setErr(new PrintStream(new LoggerOutputStream(this.getLogger().getLogger(), Level.SEVERE), true)); - // CraftBukkit end -+ org.spigotmc.SpigotConfig.init(); // Spigot +@@ -89,6 +89,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + if (this.G() < 0) { + this.setPort(this.propertyManager.getInt("server-port", 25565)); + } ++ // Spigot start ++ this.a((PlayerList) (new DedicatedPlayerList(this))); ++ org.spigotmc.SpigotConfig.init(); ++ // Spigot end - this.getLogger().info("Starting minecraft server version 1.5.2"); - if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) { + this.getLogger().info("Generating keypair"); + this.a(MinecraftEncryption.b()); +@@ -103,7 +107,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + return false; + } + +- this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit ++ // this.a((PlayerList) (new DedicatedPlayerList(this))); // Spigot - Moved up + + if (!this.getOnlineMode()) { + this.getLogger().warning("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!"); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 3a4ddea..de052bd 100644 --- a/src/main/java/net/minecraft/server/World.java @@ -37,19 +49,18 @@ index 3a4ddea..de052bd 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 00326c1..92c6c88 100644 +index 00326c1..24f1f39 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -213,7 +213,7 @@ public final class CraftServer implements Server { +@@ -213,7 +213,6 @@ public final class CraftServer implements Server { updater.getOnBroken().addAll(configuration.getStringList("auto-updater.on-broken")); updater.getOnUpdate().addAll(configuration.getStringList("auto-updater.on-update")); updater.check(serverVersion); - -+ org.spigotmc.SpigotConfig.registerCommands( commandMap ); // Spigot loadPlugins(); enablePlugins(PluginLoadOrder.STARTUP); } -@@ -556,6 +556,7 @@ public final class CraftServer implements Server { +@@ -556,6 +555,7 @@ public final class CraftServer implements Server { playerList.getIPBans().load(); playerList.getNameBans().load(); @@ -57,7 +68,7 @@ index 00326c1..92c6c88 100644 for (WorldServer world : console.worlds) { world.difficulty = difficulty; world.setSpawnFlags(monsters, animals); -@@ -570,12 +571,14 @@ public final class CraftServer implements Server { +@@ -570,6 +570,7 @@ public final class CraftServer implements Server { } else { world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns(); } @@ -65,19 +76,12 @@ index 00326c1..92c6c88 100644 } pluginManager.clearPlugins(); - commandMap.clearCommands(); - resetRecipes(); - -+ org.spigotmc.SpigotConfig.registerCommands( commandMap ); // Spigot - int pollCount = 0; - - // Wait for at most 2.5 seconds for plugins to close their threads diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..629224d +index 0000000..c532dc7 --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -0,0 +1,113 @@ +@@ -0,0 +1,111 @@ +package org.spigotmc; + +import com.google.common.base.Throwables; @@ -90,6 +94,7 @@ index 0000000..629224d +import java.util.List; +import java.util.Map; +import java.util.logging.Level; ++import net.minecraft.server.MinecraftServer; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; +import org.bukkit.command.SimpleCommandMap; @@ -126,13 +131,10 @@ index 0000000..629224d + + version = getInt( "config-version", 1 ); + readConfig( SpigotConfig.class, null ); -+ } + -+ public static void registerCommands(SimpleCommandMap commandMap) -+ { + for ( Map.Entry entry : commands.entrySet() ) + { -+ commandMap.register( entry.getKey(), "Spigot", entry.getValue() ); ++ MinecraftServer.getServer().server.getCommandMap().register( entry.getKey(), "Spigot", entry.getValue() ); + } + } + diff --git a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch index 7988d23..fb61300 100644 --- a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch +++ b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch @@ -1,4 +1,4 @@ -From a26c2eedc264aed6e095e02b5db0e497e7efccee Mon Sep 17 00:00:00 2001 +From d5c30151eab3d605a75a710a29237ffb26adf1f6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:22:07 +1000 Subject: [PATCH] Proxy IP Filter @@ -67,10 +67,10 @@ index 0000000..55d8d12 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 933500d..cbd05af 100644 +index c532dc7..632f86a 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -110,4 +110,10 @@ public class SpigotConfig +@@ -108,4 +108,10 @@ public class SpigotConfig config.addDefault( path, def ); return config.getString( path, config.getString( path ) ); } diff --git a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch index 50c15ac..9778c00 100644 --- a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch @@ -1,4 +1,4 @@ -From 80ac53c4030eb0a997b72702ce1941afa0907af1 Mon Sep 17 00:00:00 2001 +From c6c24ff3f2b9873b4f17444183e5c3eb11516eda Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 12:28:17 +1100 Subject: [PATCH] Highly Optimized Tick Loop @@ -117,10 +117,10 @@ index 0000000..f114a31 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 81f956c..ec613e3 100644 +index 632f86a..5ebb19a 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -14,6 +14,7 @@ import org.bukkit.Bukkit; +@@ -15,6 +15,7 @@ import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.SimpleCommandMap; import org.bukkit.configuration.file.YamlConfiguration; @@ -128,7 +128,7 @@ index 81f956c..ec613e3 100644 public class SpigotConfig { -@@ -116,4 +117,9 @@ public class SpigotConfig +@@ -114,4 +115,9 @@ public class SpigotConfig { preventProxies = getBoolean( "settings.prevent-proxies", false ); } diff --git a/CraftBukkit-Patches/0023-Metrics.patch b/CraftBukkit-Patches/0023-Metrics.patch index 5f916c2..92dbaed 100644 --- a/CraftBukkit-Patches/0023-Metrics.patch +++ b/CraftBukkit-Patches/0023-Metrics.patch @@ -1,4 +1,4 @@ -From 0bc162abd73017c3eb6941612ef4e2669dcf65c5 Mon Sep 17 00:00:00 2001 +From 6df166564cdcd609c552fe0b217d9671e10be660 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 08:58:35 +1100 Subject: [PATCH] Metrics @@ -657,10 +657,10 @@ index 0000000..f1690a2 +} \ No newline at end of file diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 3bd93ad..7825cfc 100644 +index 5ebb19a..9459195 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -36,6 +36,7 @@ public class SpigotConfig +@@ -37,6 +37,7 @@ public class SpigotConfig static int version; static Map commands; /*========================================================================*/ @@ -668,10 +668,10 @@ index 3bd93ad..7825cfc 100644 public static void init() { -@@ -47,6 +48,18 @@ public class SpigotConfig - - version = getInt( "config-version", 1 ); - readConfig( SpigotConfig.class, null ); +@@ -53,6 +54,18 @@ public class SpigotConfig + { + MinecraftServer.getServer().server.getCommandMap().register( entry.getKey(), "Spigot", entry.getValue() ); + } + + if ( metrics == null ) + { @@ -686,7 +686,7 @@ index 3bd93ad..7825cfc 100644 + } } - public static void registerCommands(SimpleCommandMap commandMap) + static void readConfig(Class clazz, Object instance) -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0024-Watchdog-Thread.patch b/CraftBukkit-Patches/0024-Watchdog-Thread.patch index b90bafb..c27907b 100644 --- a/CraftBukkit-Patches/0024-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0024-Watchdog-Thread.patch @@ -1,4 +1,4 @@ -From 6b299bce7cd7b47541e5c780e09555b8e2fed3ff Mon Sep 17 00:00:00 2001 +From 816df7314c4e568cef2591dfbb22ff3af869c4cb Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 12:33:20 +1100 Subject: [PATCH] Watchdog Thread. @@ -142,10 +142,10 @@ index 0000000..a5c4549 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 7825cfc..af567ac 100644 +index 9459195..d8167f2 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -135,4 +135,16 @@ public class SpigotConfig +@@ -133,4 +133,16 @@ public class SpigotConfig { commands.put( "tps", new TicksPerSecondCommand( "tps" ) ); } diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index 921fe90..249949d 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,4 +1,4 @@ -From 2a77e3a6d1b400f134c1a2dec60cc503be2b9332 Mon Sep 17 00:00:00 2001 +From 4656aab62face984022317b27962aa188daa25dd Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:23:00 +1000 Subject: [PATCH] Netty @@ -26,10 +26,10 @@ index 8c9f66b..a33020e 100644 diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 6668b7e..b2a4229 100644 +index 2d638c0..7675076 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -96,7 +96,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -99,7 +99,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer this.getLogger().info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.G()); try { @@ -183,10 +183,10 @@ index 17cfacc..a945892 100644 this.b = true; } catch (Exception exception) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 92c6c88..796085d 100644 +index 24f1f39..07bcb29 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1369,4 +1369,20 @@ public final class CraftServer implements Server { +@@ -1367,4 +1367,20 @@ public final class CraftServer implements Server { public CraftScoreboardManager getScoreboardManager() { return scoreboardManager; } @@ -350,7 +350,7 @@ index 0000000..386c2f8 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 378739e..263cb82 100644 +index d8167f2..9b74bf0 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -6,6 +6,8 @@ import java.io.IOException; @@ -362,7 +362,7 @@ index 378739e..263cb82 100644 import java.util.HashMap; import java.util.List; import java.util.Map; -@@ -147,4 +149,44 @@ public class SpigotConfig +@@ -145,4 +147,44 @@ public class SpigotConfig commands.put( "restart", new RestartCommand( "restart" ) ); WatchdogThread.doStart( timeoutTime, restartOnCrash ); } diff --git a/CraftBukkit-Patches/0030-BungeeCord-Support.patch b/CraftBukkit-Patches/0030-BungeeCord-Support.patch index 84a926b..ab603ce 100644 --- a/CraftBukkit-Patches/0030-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0030-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From acf178a300ecdb3581ae80151abb9bcc7c396f5d Mon Sep 17 00:00:00 2001 +From 8e61227e44fdc81f2c39ef5463a1013718175998 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -75,7 +75,7 @@ index 7cae665..21141f2 100644 public Spigot spigot() diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 263cb82..14a980b 100644 +index 9b74bf0..8150dd3 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -7,6 +7,7 @@ import java.lang.reflect.InvocationTargetException; @@ -86,7 +86,7 @@ index 263cb82..14a980b 100644 import java.util.Collections; import java.util.HashMap; import java.util.List; -@@ -189,4 +190,14 @@ public class SpigotConfig +@@ -187,4 +188,14 @@ public class SpigotConfig listeners.add( new Listener( host, port, netty, connectionThrottle ) ); } } diff --git a/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch b/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch index 8dc2b40..6233586 100644 --- a/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch +++ b/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch @@ -1,4 +1,4 @@ -From f812ee46c14a5b41054d533ee5727427e75d9a93 Mon Sep 17 00:00:00 2001 +From aefb985765b649229b3fd02cf32a44398bc69465 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Wed, 27 Mar 2013 01:41:54 +0200 Subject: [PATCH] Close Unloaded Save Files @@ -18,7 +18,7 @@ index 900ed68..829f4a3 100644 public static synchronized RegionFile a(File file1, int i, int j) { File file2 = new File(file1, "region"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 796085d..8746776 100644 +index 07bcb29..c5a8068 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -37,6 +37,8 @@ import net.minecraft.server.MinecraftServer; @@ -30,7 +30,7 @@ index 796085d..8746776 100644 import net.minecraft.server.ServerNBTManager; import net.minecraft.server.WorldLoaderServer; import net.minecraft.server.WorldManager; -@@ -811,6 +813,30 @@ public final class CraftServer implements Server { +@@ -809,6 +811,30 @@ public final class CraftServer implements Server { worlds.remove(world.getName().toLowerCase()); console.worlds.remove(console.worlds.indexOf(handle)); diff --git a/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch b/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch index e1e672c..412112e 100644 --- a/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch +++ b/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch @@ -1,4 +1,4 @@ -From 834d61d921f90d20f1d92e7ae5768b2c089996df Mon Sep 17 00:00:00 2001 +From 14ab621466bc84c046515970a2f5cfcac7b10f54 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jun 2013 08:20:26 +1000 Subject: [PATCH] Do Not Search for Offline Players @@ -6,10 +6,10 @@ Subject: [PATCH] Do Not Search for Offline Players By default we do not want to search as this leads to massive load times for plugins wanting to do mass data lookups. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8746776..be832ac 100644 +index c5a8068..7534188 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1088,7 +1088,7 @@ public final class CraftServer implements Server { +@@ -1086,7 +1086,7 @@ public final class CraftServer implements Server { } public OfflinePlayer getOfflinePlayer(String name) { diff --git a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch index e379d20..718ba1a 100644 --- a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch +++ b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch @@ -1,4 +1,4 @@ -From f87070d3aa96a4d3812eeb10695419ec67bf5c37 Mon Sep 17 00:00:00 2001 +From 3ffbaeae0fd56278f77e8a8efdb9afc43588dcbd Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:59:22 +1000 Subject: [PATCH] Spam Filter Exclusions @@ -19,10 +19,10 @@ index 998ac8d..a292c1a 100644 Waitable waitable = new Waitable() { @Override diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 14a980b..dd02e84 100644 +index 8150dd3..97e99aa 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -200,4 +200,13 @@ public class SpigotConfig +@@ -198,4 +198,13 @@ public class SpigotConfig bungeeAddresses = getList( "settings.bungeecord-addresses", bungee ); bungee = getBoolean( "settings.bungeecord", true ); } diff --git a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch index 095d02f..1136a90 100644 --- a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch +++ b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch @@ -1,4 +1,4 @@ -From 6d83cb6ede33f1f2b0e9765270f790bb747f5cd2 Mon Sep 17 00:00:00 2001 +From 13bb5c1c6f2533b7135286e1f3db3b3c6aa31bb5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:01:29 +1000 Subject: [PATCH] Allow Disabling of Command Logging @@ -23,10 +23,10 @@ index a292c1a..0e8d292 100644 org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot return; diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index dd02e84..b3875c1 100644 +index 97e99aa..69695d2 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -209,4 +209,10 @@ public class SpigotConfig +@@ -207,4 +207,10 @@ public class SpigotConfig "/skill" } ) ); } diff --git a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch index 25db314..9a897e7 100644 --- a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch +++ b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch @@ -1,14 +1,14 @@ -From 88294560138502bb818d2678ce19888bae1d2d8b Mon Sep 17 00:00:00 2001 +From f68dba495b59be99c881bc4085a0cf6530596ff0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:05:54 +1000 Subject: [PATCH] Allow Disabling of Command TabComplete diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index be832ac..3fa8dbe 100644 +index 7534188..4d030b0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1355,7 +1355,7 @@ public final class CraftServer implements Server { +@@ -1353,7 +1353,7 @@ public final class CraftServer implements Server { public List tabCompleteCommand(Player player, String message) { List completions = null; try { @@ -18,10 +18,10 @@ index be832ac..3fa8dbe 100644 player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index b3875c1..453d0a1 100644 +index 69695d2..d07701e 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -215,4 +215,10 @@ public class SpigotConfig +@@ -213,4 +213,10 @@ public class SpigotConfig { logCommands = getBoolean( "commands.log", true ); } From f6514125a3bb6f32b8fb9d3fe3443675a9592696 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 19:10:58 +1000 Subject: [PATCH 34/40] Load from correct class --- CraftBukkit-Patches/0004-Spigot-Configuration.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 8c58aea..812a2ca 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,4 +1,4 @@ -From dc35d23de6e9199f9e1636f0c9e4e44e510513fa Mon Sep 17 00:00:00 2001 +From fddd6adfdc0d19ca28245d4e3618a87b6185ec94 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 19:06:58 +1000 Subject: [PATCH] Spigot Configuration @@ -78,7 +78,7 @@ index 00326c1..24f1f39 100644 pluginManager.clearPlugins(); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..c532dc7 +index 0000000..f6d3bcb --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +1,111 @@ @@ -140,7 +140,7 @@ index 0000000..c532dc7 + + static void readConfig(Class clazz, Object instance) + { -+ for ( Method method : SpigotConfig.class.getDeclaredMethods() ) ++ for ( Method method : clazz.getDeclaredMethods() ) + { + if ( Modifier.isPrivate( method.getModifiers() ) ) + { From 9c2abd8b659adaac0c8bb951e788f8265e410ec7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 19:17:26 +1000 Subject: [PATCH 35/40] The server loads all settings correctly as far as I can tell. This marks the end of stage 2. Stage 3 (testing of all features and commands) will start tomorrow. --- CraftBukkit-Patches/0004-Spigot-Configuration.patch | 11 ++++++----- CraftBukkit-Patches/0009-Proxy-IP-Filter.patch | 6 +++--- .../0017-Highly-Optimized-Tick-Loop.patch | 6 +++--- CraftBukkit-Patches/0024-Watchdog-Thread.patch | 6 +++--- CraftBukkit-Patches/0025-Netty.patch | 6 +++--- CraftBukkit-Patches/0030-BungeeCord-Support.patch | 6 +++--- CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch | 6 +++--- .../0051-Allow-Disabling-of-Command-Logging.patch | 6 +++--- .../0052-Allow-Disabling-of-Command-TabComplete.patch | 6 +++--- 9 files changed, 30 insertions(+), 29 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 812a2ca..5054cac 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,4 +1,4 @@ -From fddd6adfdc0d19ca28245d4e3618a87b6185ec94 Mon Sep 17 00:00:00 2001 +From 6d02dec6b5b43138083f33d639e9769a6b4c54d0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 19:06:58 +1000 Subject: [PATCH] Spigot Configuration @@ -78,10 +78,10 @@ index 00326c1..24f1f39 100644 pluginManager.clearPlugins(); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..f6d3bcb +index 0000000..c6cf18e --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -0,0 +1,111 @@ +@@ -0,0 +1,112 @@ +package org.spigotmc; + +import com.google.common.base.Throwables; @@ -114,7 +114,7 @@ index 0000000..f6d3bcb + + "join us at the IRC or drop by our forums and leave a post.\n" + + "\n" + + "IRC: #spigot @ irc.esper.net ( http://webchat.esper.net/?channel=spigot )\n" -+ + "Forums: http://www.spigotmc.org/forum/"; ++ + "Forums: http://www.spigotmc.org/forum/\n"; + /*========================================================================*/ + static YamlConfiguration config; + static int version; @@ -144,10 +144,11 @@ index 0000000..f6d3bcb + { + if ( Modifier.isPrivate( method.getModifiers() ) ) + { -+ if ( method.getParameterTypes().length == 0 ) ++ if ( method.getParameterTypes().length == 0 && method.getReturnType() == Void.TYPE ) + { + try + { ++ method.setAccessible( true ); + method.invoke( instance ); + } catch ( InvocationTargetException ex ) + { diff --git a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch index fb61300..2b22b74 100644 --- a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch +++ b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch @@ -1,4 +1,4 @@ -From d5c30151eab3d605a75a710a29237ffb26adf1f6 Mon Sep 17 00:00:00 2001 +From 3bb4fed2ec0758923220bcf21388d9f1a9f25377 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:22:07 +1000 Subject: [PATCH] Proxy IP Filter @@ -67,10 +67,10 @@ index 0000000..55d8d12 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index c532dc7..632f86a 100644 +index 0b81a86..b4656d4 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -108,4 +108,10 @@ public class SpigotConfig +@@ -109,4 +109,10 @@ public class SpigotConfig config.addDefault( path, def ); return config.getString( path, config.getString( path ) ); } diff --git a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch index 9778c00..3b01f07 100644 --- a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch @@ -1,4 +1,4 @@ -From c6c24ff3f2b9873b4f17444183e5c3eb11516eda Mon Sep 17 00:00:00 2001 +From 04e51665bd1ac94510c2eb76ef995bfb2dd40e05 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 12:28:17 +1100 Subject: [PATCH] Highly Optimized Tick Loop @@ -117,7 +117,7 @@ index 0000000..f114a31 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 632f86a..5ebb19a 100644 +index b4656d4..66bf600 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -15,6 +15,7 @@ import org.bukkit.Bukkit; @@ -128,7 +128,7 @@ index 632f86a..5ebb19a 100644 public class SpigotConfig { -@@ -114,4 +115,9 @@ public class SpigotConfig +@@ -115,4 +116,9 @@ public class SpigotConfig { preventProxies = getBoolean( "settings.prevent-proxies", false ); } diff --git a/CraftBukkit-Patches/0024-Watchdog-Thread.patch b/CraftBukkit-Patches/0024-Watchdog-Thread.patch index c27907b..52e951e 100644 --- a/CraftBukkit-Patches/0024-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0024-Watchdog-Thread.patch @@ -1,4 +1,4 @@ -From 816df7314c4e568cef2591dfbb22ff3af869c4cb Mon Sep 17 00:00:00 2001 +From 62cef831a76dbfe52e85f86902931b43a6fd50a3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 12:33:20 +1100 Subject: [PATCH] Watchdog Thread. @@ -142,10 +142,10 @@ index 0000000..a5c4549 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 9459195..d8167f2 100644 +index fdab366..32140d1 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -133,4 +133,16 @@ public class SpigotConfig +@@ -134,4 +134,16 @@ public class SpigotConfig { commands.put( "tps", new TicksPerSecondCommand( "tps" ) ); } diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index 249949d..f3640d8 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,4 +1,4 @@ -From 4656aab62face984022317b27962aa188daa25dd Mon Sep 17 00:00:00 2001 +From ad431c66fd54963754e01d91185c0741474bdfe6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:23:00 +1000 Subject: [PATCH] Netty @@ -350,7 +350,7 @@ index 0000000..386c2f8 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index d8167f2..9b74bf0 100644 +index 32140d1..e762527 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -6,6 +6,8 @@ import java.io.IOException; @@ -362,7 +362,7 @@ index d8167f2..9b74bf0 100644 import java.util.HashMap; import java.util.List; import java.util.Map; -@@ -145,4 +147,44 @@ public class SpigotConfig +@@ -146,4 +148,44 @@ public class SpigotConfig commands.put( "restart", new RestartCommand( "restart" ) ); WatchdogThread.doStart( timeoutTime, restartOnCrash ); } diff --git a/CraftBukkit-Patches/0030-BungeeCord-Support.patch b/CraftBukkit-Patches/0030-BungeeCord-Support.patch index ab603ce..df0df20 100644 --- a/CraftBukkit-Patches/0030-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0030-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From 8e61227e44fdc81f2c39ef5463a1013718175998 Mon Sep 17 00:00:00 2001 +From eae71452b63e57a58eff69db1b7d444bd5829120 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -75,7 +75,7 @@ index 7cae665..21141f2 100644 public Spigot spigot() diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 9b74bf0..8150dd3 100644 +index e762527..6234dca 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -7,6 +7,7 @@ import java.lang.reflect.InvocationTargetException; @@ -86,7 +86,7 @@ index 9b74bf0..8150dd3 100644 import java.util.Collections; import java.util.HashMap; import java.util.List; -@@ -187,4 +188,14 @@ public class SpigotConfig +@@ -188,4 +189,14 @@ public class SpigotConfig listeners.add( new Listener( host, port, netty, connectionThrottle ) ); } } diff --git a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch index 718ba1a..42cc98e 100644 --- a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch +++ b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch @@ -1,4 +1,4 @@ -From 3ffbaeae0fd56278f77e8a8efdb9afc43588dcbd Mon Sep 17 00:00:00 2001 +From 7dbc12290307517690e119452320858103500a7f Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:59:22 +1000 Subject: [PATCH] Spam Filter Exclusions @@ -19,10 +19,10 @@ index 998ac8d..a292c1a 100644 Waitable waitable = new Waitable() { @Override diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 8150dd3..97e99aa 100644 +index 6234dca..3c32b08 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -198,4 +198,13 @@ public class SpigotConfig +@@ -199,4 +199,13 @@ public class SpigotConfig bungeeAddresses = getList( "settings.bungeecord-addresses", bungee ); bungee = getBoolean( "settings.bungeecord", true ); } diff --git a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch index 1136a90..10e14d2 100644 --- a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch +++ b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch @@ -1,4 +1,4 @@ -From 13bb5c1c6f2533b7135286e1f3db3b3c6aa31bb5 Mon Sep 17 00:00:00 2001 +From 36f3fc0a1175cf0b6dc14b0253de6ed6eb67fd58 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:01:29 +1000 Subject: [PATCH] Allow Disabling of Command Logging @@ -23,10 +23,10 @@ index a292c1a..0e8d292 100644 org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot return; diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 97e99aa..69695d2 100644 +index 3c32b08..e15bf25 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -207,4 +207,10 @@ public class SpigotConfig +@@ -208,4 +208,10 @@ public class SpigotConfig "/skill" } ) ); } diff --git a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch index 9a897e7..845d0dd 100644 --- a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch +++ b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch @@ -1,4 +1,4 @@ -From f68dba495b59be99c881bc4085a0cf6530596ff0 Mon Sep 17 00:00:00 2001 +From 61994fd6edb1fc608e913d2008fb7ec602c3056e Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:05:54 +1000 Subject: [PATCH] Allow Disabling of Command TabComplete @@ -18,10 +18,10 @@ index 7534188..4d030b0 100644 player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 69695d2..d07701e 100644 +index e15bf25..8ac5e41 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -213,4 +213,10 @@ public class SpigotConfig +@@ -214,4 +214,10 @@ public class SpigotConfig { logCommands = getBoolean( "commands.log", true ); } From a18171d81cd989a2df8a6a96c401194190a65cad Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 19:22:15 +1000 Subject: [PATCH 36/40] Add a patch to allow configuring and editing some server messages. --- .../0053-Configurable-Messages.patch | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 CraftBukkit-Patches/0053-Configurable-Messages.patch diff --git a/CraftBukkit-Patches/0053-Configurable-Messages.patch b/CraftBukkit-Patches/0053-Configurable-Messages.patch new file mode 100644 index 0000000..8503d20 --- /dev/null +++ b/CraftBukkit-Patches/0053-Configurable-Messages.patch @@ -0,0 +1,64 @@ +From 6484c43dc5b08c4317b478c9e86d03c3bb2b43c9 Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Fri, 21 Jun 2013 19:21:58 +1000 +Subject: [PATCH] Configurable Messages + + +diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java +index fe846af..edeefba 100644 +--- a/src/main/java/net/minecraft/server/PlayerList.java ++++ b/src/main/java/net/minecraft/server/PlayerList.java +@@ -307,7 +307,7 @@ public abstract class PlayerList { + + event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s1); + } else if (!this.isWhitelisted(s)) { +- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "You are not white-listed on this server!"); ++ event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot + } else { + String s2 = socketaddress.toString(); + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 4d030b0..71ce507 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -525,7 +525,7 @@ public final class CraftServer implements Server { + return true; + } + +- sender.sendMessage("Unknown command. Type \"help\" for help."); ++ sender.sendMessage(org.spigotmc.SpigotConfig.unknownCommandMessage); + + return false; + } +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index e91f364..992b9c7 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -15,6 +15,7 @@ import java.util.Map; + import java.util.logging.Level; + import net.minecraft.server.MinecraftServer; + import org.bukkit.Bukkit; ++import org.bukkit.ChatColor; + import org.bukkit.command.Command; + import org.bukkit.command.SimpleCommandMap; + import org.bukkit.configuration.file.YamlConfiguration; +@@ -220,4 +221,16 @@ public class SpigotConfig + { + tabComplete = getBoolean( "commands.tab-complete", true ); + } ++ ++ public static String whitelistMessage; ++ public static String unknownCommandMessage; ++ private static String transform(String s) ++ { ++ return ChatColor.translateAlternateColorCodes( '&', s ).replaceAll( "\\n", "\n" ); ++ } ++ private static void messages() ++ { ++ whitelistMessage = transform( getString( "messages.whitelist", "You are not whitelisted on this server!" ) ); ++ unknownCommandMessage = transform( getString( "messages.unknown-command", "Unknown command. Type \"help\" for help." ) ); ++ } + } +-- +1.8.1.2 + From a79c1fc577dc58008319e7374614f0f950a92d7d Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 22 Jun 2013 13:59:56 +1000 Subject: [PATCH 37/40] Integer cannot be cast to Short :( --- CraftBukkit-Patches/0019-Orebfuscator.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CraftBukkit-Patches/0019-Orebfuscator.patch b/CraftBukkit-Patches/0019-Orebfuscator.patch index 2ae0be0..081f6be 100644 --- a/CraftBukkit-Patches/0019-Orebfuscator.patch +++ b/CraftBukkit-Patches/0019-Orebfuscator.patch @@ -1,4 +1,4 @@ -From f9b52ad834a62522ab547a804d3039c43ed2a9f8 Mon Sep 17 00:00:00 2001 +From 8a73fd5e8b75b6438a2cc7fbcd6d69c69b1f7264 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator @@ -108,7 +108,7 @@ index 1243d1d..9ec8997 100644 diff --git a/src/main/java/org/spigotmc/AntiXray.java b/src/main/java/org/spigotmc/AntiXray.java new file mode 100644 -index 0000000..74ee741 +index 0000000..c29b789 --- /dev/null +++ b/src/main/java/org/spigotmc/AntiXray.java @@ -0,0 +1,203 @@ @@ -133,7 +133,7 @@ index 0000000..74ee741 + public AntiXray(SpigotWorldConfig config) + { + // Set all listed blocks as true to be obfuscated -+ for ( short id : config.blocks ) ++ for ( int id : config.blocks ) + { + obfuscateBlocks[id] = true; + } @@ -316,7 +316,7 @@ index 0000000..74ee741 + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index d7e9794..660c660 100644 +index d7e9794..3525e9b 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -1,5 +1,6 @@ @@ -333,7 +333,7 @@ index d7e9794..660c660 100644 + + public boolean antiXray = true; + public int engineMode = 1; -+ public List blocks = Arrays.asList( new Short[] ++ public List blocks = Arrays.asList( new Integer[] + { + 1, 5, 14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130 + } ); From 5b3bd96325bd1c4e98736d256cfa9f6d179a6d57 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 22 Jun 2013 14:07:01 +1000 Subject: [PATCH 38/40] Properly re-register commands on reload --- .../0004-Spigot-Configuration.patch | 45 +++++++++---------- .../0005-Better-Chunk-Tick-Selection.patch | 6 +-- .../0006-Crop-Growth-Rates.patch | 6 +-- .../0009-Proxy-IP-Filter.patch | 6 +-- .../0010-Merge-tweaks-and-configuration.patch | 6 +-- CraftBukkit-Patches/0013-View-Distance.patch | 6 +-- .../0017-Highly-Optimized-Tick-Loop.patch | 10 ++--- CraftBukkit-Patches/0019-Orebfuscator.patch | 6 +-- ...b-Spawning-Relative-to-View-Distance.patch | 6 +-- .../0022-Entity-Activation-Range.patch | 6 +-- CraftBukkit-Patches/0023-Metrics.patch | 8 ++-- .../0024-Watchdog-Thread.patch | 6 +-- CraftBukkit-Patches/0025-Netty.patch | 14 +++--- .../0029-Entity-Tracking-Ranges.patch | 6 +-- .../0030-BungeeCord-Support.patch | 6 +-- .../0035-Close-Unloaded-Save-Files.patch | 6 +-- .../0044-Hopper-Cooldowns.patch | 6 +-- ...48-Do-Not-Search-for-Offline-Players.patch | 6 +-- .../0050-Spam-Filter-Exclusions.patch | 6 +-- ...1-Allow-Disabling-of-Command-Logging.patch | 6 +-- ...low-Disabling-of-Command-TabComplete.patch | 10 ++--- .../0053-Configurable-Messages.patch | 12 ++--- 22 files changed, 97 insertions(+), 98 deletions(-) diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index 5054cac..df4ff1f 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,25 +1,26 @@ -From 6d02dec6b5b43138083f33d639e9769a6b4c54d0 Mon Sep 17 00:00:00 2001 +From 30196d52fe8630bfa0dd6ccf218e2a0461310fc8 Mon Sep 17 00:00:00 2001 From: md_5 -Date: Fri, 21 Jun 2013 19:06:58 +1000 +Date: Sat, 22 Jun 2013 14:06:41 +1000 Subject: [PATCH] Spigot Configuration diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 7261dc9..2d638c0 100644 +index 7261dc9..59444cb 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -89,6 +89,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -89,6 +89,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer if (this.G() < 0) { this.setPort(this.propertyManager.getInt("server-port", 25565)); } + // Spigot start + this.a((PlayerList) (new DedicatedPlayerList(this))); + org.spigotmc.SpigotConfig.init(); ++ org.spigotmc.SpigotConfig.registerCommands(); + // Spigot end this.getLogger().info("Generating keypair"); this.a(MinecraftEncryption.b()); -@@ -103,7 +107,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -103,7 +108,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer return false; } @@ -49,18 +50,10 @@ index 3a4ddea..de052bd 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 00326c1..24f1f39 100644 +index 00326c1..6e6fe1c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -213,7 +213,6 @@ public final class CraftServer implements Server { - updater.getOnBroken().addAll(configuration.getStringList("auto-updater.on-broken")); - updater.getOnUpdate().addAll(configuration.getStringList("auto-updater.on-update")); - updater.check(serverVersion); -- - loadPlugins(); - enablePlugins(PluginLoadOrder.STARTUP); - } -@@ -556,6 +555,7 @@ public final class CraftServer implements Server { +@@ -556,6 +556,7 @@ public final class CraftServer implements Server { playerList.getIPBans().load(); playerList.getNameBans().load(); @@ -68,7 +61,7 @@ index 00326c1..24f1f39 100644 for (WorldServer world : console.worlds) { world.difficulty = difficulty; world.setSpawnFlags(monsters, animals); -@@ -570,6 +570,7 @@ public final class CraftServer implements Server { +@@ -570,11 +571,13 @@ public final class CraftServer implements Server { } else { world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns(); } @@ -76,12 +69,18 @@ index 00326c1..24f1f39 100644 } pluginManager.clearPlugins(); + commandMap.clearCommands(); + resetRecipes(); ++ org.spigotmc.SpigotConfig.registerCommands(); // Spigot + + int pollCount = 0; + diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..c6cf18e +index 0000000..1d915fb --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -0,0 +1,112 @@ +@@ -0,0 +1,114 @@ +package org.spigotmc; + +import com.google.common.base.Throwables; @@ -97,7 +96,6 @@ index 0000000..c6cf18e +import net.minecraft.server.MinecraftServer; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; -+import org.bukkit.command.SimpleCommandMap; +import org.bukkit.configuration.file.YamlConfiguration; + +public class SpigotConfig @@ -131,7 +129,10 @@ index 0000000..c6cf18e + + version = getInt( "config-version", 1 ); + readConfig( SpigotConfig.class, null ); ++ } + ++ public static void registerCommands() ++ { + for ( Map.Entry entry : commands.entrySet() ) + { + MinecraftServer.getServer().server.getCommandMap().register( entry.getKey(), "Spigot", entry.getValue() ); @@ -196,10 +197,10 @@ index 0000000..c6cf18e +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java new file mode 100644 -index 0000000..78a7573 +index 0000000..3f8562f --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -0,0 +1,68 @@ +@@ -0,0 +1,66 @@ +package org.spigotmc; + +import java.util.List; @@ -224,10 +225,8 @@ index 0000000..78a7573 + { + this.verbose = getBoolean( "verbose", true ); + -+ log( "-------------- Spigot ----------------" ); + log( "-------- World Settings For [" + worldName + "] --------" ); + SpigotConfig.readConfig( SpigotWorldConfig.class, this ); -+ log( "-------------------------------------------------" ); + } + + private void log(String s) diff --git a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch index 020e763..19772f1 100644 --- a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch +++ b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch @@ -1,4 +1,4 @@ -From 2a6d2a8feddce00e9d66e2b17088e84b54748fd7 Mon Sep 17 00:00:00 2001 +From a4f3a529237119d805302947bd76ddb384bd9379 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:56:02 +1000 Subject: [PATCH] Better Chunk Tick Selection @@ -148,10 +148,10 @@ index 49360c1..6c3fcf1 100644 } } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 78a7573..1a13e18 100644 +index 3f8562f..123fb7a 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -65,4 +65,11 @@ public class SpigotWorldConfig +@@ -63,4 +63,11 @@ public class SpigotWorldConfig config.addDefault( "world-settings.default." + path, def ); return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); } diff --git a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch index d3e7056..9fbbcc2 100644 --- a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch +++ b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch @@ -1,4 +1,4 @@ -From f7f5efd1e09e9ec6ff47206b21e2baff2aba71b0 Mon Sep 17 00:00:00 2001 +From e1460ee5d26b7d86cf40f75297367ac293712e1b Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:17:20 +1000 Subject: [PATCH] Crop Growth Rates @@ -132,10 +132,10 @@ index 8339a35..c7e2344 100644 if (l < 7) { diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 1a13e18..17b43c1 100644 +index 123fb7a..a929766 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -72,4 +72,36 @@ public class SpigotWorldConfig +@@ -70,4 +70,36 @@ public class SpigotWorldConfig chunksPerTick = getInt( "chunks-per-tick", 650 ); log( "Chunks to Grow per Tick: " + chunksPerTick ); } diff --git a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch index 2b22b74..fd42474 100644 --- a/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch +++ b/CraftBukkit-Patches/0009-Proxy-IP-Filter.patch @@ -1,4 +1,4 @@ -From 3bb4fed2ec0758923220bcf21388d9f1a9f25377 Mon Sep 17 00:00:00 2001 +From 6c8715e0ffd4ce12e51b1505bab0af4908744c2e Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 23 Apr 2013 11:22:07 +1000 Subject: [PATCH] Proxy IP Filter @@ -67,10 +67,10 @@ index 0000000..55d8d12 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 0b81a86..b4656d4 100644 +index 1d915fb..56ac067 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -109,4 +109,10 @@ public class SpigotConfig +@@ -111,4 +111,10 @@ public class SpigotConfig config.addDefault( path, def ); return config.getString( path, config.getString( path ) ); } diff --git a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch index 1a2c471..4236cc6 100644 --- a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch +++ b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch @@ -1,4 +1,4 @@ -From dc6b4cae56006f9b5cc4a041d832d0bc314e3c16 Mon Sep 17 00:00:00 2001 +From dcf6e48a2c498079f9c10f19242ee3a8869101d7 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 @@ -69,10 +69,10 @@ index afe3e4d..97da2cd 100644 if (event != null && (event.isCancelled() || entity.dead)) { entity.dead = true; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 17b43c1..705ee2e 100644 +index a929766..ea7c211 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -104,4 +104,18 @@ public class SpigotWorldConfig +@@ -102,4 +102,18 @@ public class SpigotWorldConfig wheatModifier = getInt( "growth.wheat-modifier", 100 ); log( "Cactus Growth Modifier: " + cactusModifier + "%" ); } diff --git a/CraftBukkit-Patches/0013-View-Distance.patch b/CraftBukkit-Patches/0013-View-Distance.patch index 6db218a..d02b11d 100644 --- a/CraftBukkit-Patches/0013-View-Distance.patch +++ b/CraftBukkit-Patches/0013-View-Distance.patch @@ -1,4 +1,4 @@ -From 054568f23c2021036cef88d2d9ff41f086dba1a1 Mon Sep 17 00:00:00 2001 +From 25fa2cfa4437bbbe2eb832d7ec12070d8842a087 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:52:41 +1100 Subject: [PATCH] View Distance @@ -32,10 +32,10 @@ index 6c3fcf1..614a17f 100644 this.entitiesById = new IntHashMap(); } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 705ee2e..d7e9794 100644 +index ea7c211..81879e6 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -118,4 +118,11 @@ public class SpigotWorldConfig +@@ -116,4 +116,11 @@ public class SpigotWorldConfig expMerge = getDouble("merge-radius.exp", 3.0 ); log( "Experience Merge Radius: " + expMerge ); } diff --git a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch index 3b01f07..1535168 100644 --- a/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0017-Highly-Optimized-Tick-Loop.patch @@ -1,4 +1,4 @@ -From 04e51665bd1ac94510c2eb76ef995bfb2dd40e05 Mon Sep 17 00:00:00 2001 +From ac8a1f6656ae9cd13e08c9e25b379769c9a6c7ae Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 12:28:17 +1100 Subject: [PATCH] Highly Optimized Tick Loop @@ -117,18 +117,18 @@ index 0000000..f114a31 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index b4656d4..66bf600 100644 +index 56ac067..d22e8e5 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -15,6 +15,7 @@ import org.bukkit.Bukkit; +@@ -14,6 +14,7 @@ import net.minecraft.server.MinecraftServer; + import org.bukkit.Bukkit; import org.bukkit.command.Command; - import org.bukkit.command.SimpleCommandMap; import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.craftbukkit.command.TicksPerSecondCommand; public class SpigotConfig { -@@ -115,4 +116,9 @@ public class SpigotConfig +@@ -117,4 +118,9 @@ public class SpigotConfig { preventProxies = getBoolean( "settings.prevent-proxies", false ); } diff --git a/CraftBukkit-Patches/0019-Orebfuscator.patch b/CraftBukkit-Patches/0019-Orebfuscator.patch index 081f6be..25fafee 100644 --- a/CraftBukkit-Patches/0019-Orebfuscator.patch +++ b/CraftBukkit-Patches/0019-Orebfuscator.patch @@ -1,4 +1,4 @@ -From 8a73fd5e8b75b6438a2cc7fbcd6d69c69b1f7264 Mon Sep 17 00:00:00 2001 +From 90de56da643bde4b842cc958a4b449634bb9ba8c Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator @@ -316,7 +316,7 @@ index 0000000..c29b789 + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index d7e9794..3525e9b 100644 +index 81879e6..0a304e8 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -1,5 +1,6 @@ @@ -326,7 +326,7 @@ index d7e9794..3525e9b 100644 import java.util.List; import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; -@@ -125,4 +126,25 @@ public class SpigotWorldConfig +@@ -123,4 +124,25 @@ public class SpigotWorldConfig viewDistance = getInt( "view-distance", Bukkit.getViewDistance() ); log( "View Distance: " + viewDistance ); } diff --git a/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch index a49e84b..de8b463 100644 --- a/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch +++ b/CraftBukkit-Patches/0020-Fix-Mob-Spawning-Relative-to-View-Distance.patch @@ -1,4 +1,4 @@ -From 3e1f376bdd56f8214943d4cd50fec60d4afab2ee Mon Sep 17 00:00:00 2001 +From d1a43b7d46685cdaa095ef806f9300db709c5d84 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:29:54 +1000 Subject: [PATCH] Fix Mob Spawning Relative to View Distance @@ -121,10 +121,10 @@ index 056100f..bec0d91 100644 continue label110; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 660c660..81db826 100644 +index 0a304e8..6c2a430 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -147,4 +147,11 @@ public class SpigotWorldConfig +@@ -145,4 +145,11 @@ public class SpigotWorldConfig antiXrayInstance = new AntiXray( this ); } diff --git a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch index 178ecdf..e53a49b 100644 --- a/CraftBukkit-Patches/0022-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0022-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From e40f1e3ad3bb6f8ce6262dba58e92764f50dfb4b Mon Sep 17 00:00:00 2001 +From df64c572448edbe8dcefa1eeaaccc7a389f626f7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -462,10 +462,10 @@ index 0000000..93ce20e + } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 81db826..263bc15 100644 +index 6c2a430..8b2c1d7 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -154,4 +154,15 @@ public class SpigotWorldConfig +@@ -152,4 +152,15 @@ public class SpigotWorldConfig mobSpawnRange = (byte) getInt( "mob-spawn-range", 4 ); log( "Mob Spawn Range: " + mobSpawnRange ); } diff --git a/CraftBukkit-Patches/0023-Metrics.patch b/CraftBukkit-Patches/0023-Metrics.patch index 92dbaed..2996b46 100644 --- a/CraftBukkit-Patches/0023-Metrics.patch +++ b/CraftBukkit-Patches/0023-Metrics.patch @@ -1,4 +1,4 @@ -From 6df166564cdcd609c552fe0b217d9671e10be660 Mon Sep 17 00:00:00 2001 +From a32d38cde53297cbbb1b3f674ccf493d22778ba5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 08:58:35 +1100 Subject: [PATCH] Metrics @@ -657,10 +657,10 @@ index 0000000..f1690a2 +} \ No newline at end of file diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 5ebb19a..9459195 100644 +index d22e8e5..8f53ca9 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -37,6 +37,7 @@ public class SpigotConfig +@@ -36,6 +36,7 @@ public class SpigotConfig static int version; static Map commands; /*========================================================================*/ @@ -668,7 +668,7 @@ index 5ebb19a..9459195 100644 public static void init() { -@@ -53,6 +54,18 @@ public class SpigotConfig +@@ -55,6 +56,18 @@ public class SpigotConfig { MinecraftServer.getServer().server.getCommandMap().register( entry.getKey(), "Spigot", entry.getValue() ); } diff --git a/CraftBukkit-Patches/0024-Watchdog-Thread.patch b/CraftBukkit-Patches/0024-Watchdog-Thread.patch index 52e951e..ea0f4fe 100644 --- a/CraftBukkit-Patches/0024-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0024-Watchdog-Thread.patch @@ -1,4 +1,4 @@ -From 62cef831a76dbfe52e85f86902931b43a6fd50a3 Mon Sep 17 00:00:00 2001 +From 3c8f2ccaa98803166178f16290fce2b8626e6ebb Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 12:33:20 +1100 Subject: [PATCH] Watchdog Thread. @@ -142,10 +142,10 @@ index 0000000..a5c4549 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index fdab366..32140d1 100644 +index 8f53ca9..b7f3896 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -134,4 +134,16 @@ public class SpigotConfig +@@ -136,4 +136,16 @@ public class SpigotConfig { commands.put( "tps", new TicksPerSecondCommand( "tps" ) ); } diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index f3640d8..1e946d4 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,4 +1,4 @@ -From ad431c66fd54963754e01d91185c0741474bdfe6 Mon Sep 17 00:00:00 2001 +From 33f4ba2034fd8cd22a8b9da2115c25000154c038 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:23:00 +1000 Subject: [PATCH] Netty @@ -26,10 +26,10 @@ index 8c9f66b..a33020e 100644 diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 2d638c0..7675076 100644 +index 59444cb..e101f95 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -99,7 +99,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -100,7 +100,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer this.getLogger().info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.G()); try { @@ -183,10 +183,10 @@ index 17cfacc..a945892 100644 this.b = true; } catch (Exception exception) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 24f1f39..07bcb29 100644 +index 6e6fe1c..68694de 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1367,4 +1367,20 @@ public final class CraftServer implements Server { +@@ -1369,4 +1369,20 @@ public final class CraftServer implements Server { public CraftScoreboardManager getScoreboardManager() { return scoreboardManager; } @@ -350,7 +350,7 @@ index 0000000..386c2f8 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 32140d1..e762527 100644 +index b7f3896..606b01e 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -6,6 +6,8 @@ import java.io.IOException; @@ -362,7 +362,7 @@ index 32140d1..e762527 100644 import java.util.HashMap; import java.util.List; import java.util.Map; -@@ -146,4 +148,44 @@ public class SpigotConfig +@@ -148,4 +150,44 @@ public class SpigotConfig commands.put( "restart", new RestartCommand( "restart" ) ); WatchdogThread.doStart( timeoutTime, restartOnCrash ); } diff --git a/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch index da4ca3a..9ee8eb1 100644 --- a/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch +++ b/CraftBukkit-Patches/0029-Entity-Tracking-Ranges.patch @@ -1,4 +1,4 @@ -From aa295927ecd733806da255f2e88f48d8b66e3cdd Mon Sep 17 00:00:00 2001 +From 17fbd3f0e6586b3b59b8bbd9f4327e4a09512b24 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Feb 2013 11:58:47 -0500 Subject: [PATCH] Entity Tracking Ranges @@ -24,10 +24,10 @@ index d7efe3e..59586c2 100644 i = this.d; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 263bc15..c7ccbce 100644 +index 8b2c1d7..89d716c 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -165,4 +165,19 @@ public class SpigotWorldConfig +@@ -163,4 +163,19 @@ public class SpigotWorldConfig miscActivationRange = getInt( "entity-activation-range.misc", miscActivationRange ); log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Mi " + miscActivationRange ); } diff --git a/CraftBukkit-Patches/0030-BungeeCord-Support.patch b/CraftBukkit-Patches/0030-BungeeCord-Support.patch index df0df20..b8af01e 100644 --- a/CraftBukkit-Patches/0030-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0030-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From eae71452b63e57a58eff69db1b7d444bd5829120 Mon Sep 17 00:00:00 2001 +From 2aec923f52118621b312e361b2a38b3b92c185c2 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -75,7 +75,7 @@ index 7cae665..21141f2 100644 public Spigot spigot() diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index e762527..6234dca 100644 +index 606b01e..042241c 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -7,6 +7,7 @@ import java.lang.reflect.InvocationTargetException; @@ -86,7 +86,7 @@ index e762527..6234dca 100644 import java.util.Collections; import java.util.HashMap; import java.util.List; -@@ -188,4 +189,14 @@ public class SpigotConfig +@@ -190,4 +191,14 @@ public class SpigotConfig listeners.add( new Listener( host, port, netty, connectionThrottle ) ); } } diff --git a/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch b/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch index 6233586..6f24dd6 100644 --- a/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch +++ b/CraftBukkit-Patches/0035-Close-Unloaded-Save-Files.patch @@ -1,4 +1,4 @@ -From aefb985765b649229b3fd02cf32a44398bc69465 Mon Sep 17 00:00:00 2001 +From 84f08c5d634c68048f6621cdd42344ce0bc8a9ea Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Wed, 27 Mar 2013 01:41:54 +0200 Subject: [PATCH] Close Unloaded Save Files @@ -18,7 +18,7 @@ index 900ed68..829f4a3 100644 public static synchronized RegionFile a(File file1, int i, int j) { File file2 = new File(file1, "region"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 07bcb29..c5a8068 100644 +index 68694de..2cca80a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -37,6 +37,8 @@ import net.minecraft.server.MinecraftServer; @@ -30,7 +30,7 @@ index 07bcb29..c5a8068 100644 import net.minecraft.server.ServerNBTManager; import net.minecraft.server.WorldLoaderServer; import net.minecraft.server.WorldManager; -@@ -809,6 +811,30 @@ public final class CraftServer implements Server { +@@ -811,6 +813,30 @@ public final class CraftServer implements Server { worlds.remove(world.getName().toLowerCase()); console.worlds.remove(console.worlds.indexOf(handle)); diff --git a/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch b/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch index a6c1946..c890cae 100644 --- a/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch +++ b/CraftBukkit-Patches/0044-Hopper-Cooldowns.patch @@ -1,4 +1,4 @@ -From 5f0677ff55d769c9cc1b2db56fe190f422c71b8b Mon Sep 17 00:00:00 2001 +From 2a158ef53f85cf5004c22e680bfe80dcd1f4f573 Mon Sep 17 00:00:00 2001 From: DerFlash Date: Sun, 2 Jun 2013 16:23:46 +1000 Subject: [PATCH] Hopper Cooldowns @@ -64,10 +64,10 @@ index f6d269d..1f69c7b 100644 iinventory.update(); diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index c7ccbce..da5f510 100644 +index 89d716c..8f13fa9 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -180,4 +180,13 @@ public class SpigotWorldConfig +@@ -178,4 +178,13 @@ public class SpigotWorldConfig maxTrackingRange = getInt( "entity-tracking-range.other", maxTrackingRange ); log( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Other " + maxTrackingRange ); } diff --git a/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch b/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch index 412112e..f0ac4b1 100644 --- a/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch +++ b/CraftBukkit-Patches/0048-Do-Not-Search-for-Offline-Players.patch @@ -1,4 +1,4 @@ -From 14ab621466bc84c046515970a2f5cfcac7b10f54 Mon Sep 17 00:00:00 2001 +From 4822e71bfb0e5730738fd2a06a4bf3ff33e75c28 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jun 2013 08:20:26 +1000 Subject: [PATCH] Do Not Search for Offline Players @@ -6,10 +6,10 @@ Subject: [PATCH] Do Not Search for Offline Players By default we do not want to search as this leads to massive load times for plugins wanting to do mass data lookups. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c5a8068..7534188 100644 +index 2cca80a..1fcbd33 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1086,7 +1086,7 @@ public final class CraftServer implements Server { +@@ -1088,7 +1088,7 @@ public final class CraftServer implements Server { } public OfflinePlayer getOfflinePlayer(String name) { diff --git a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch index 42cc98e..7483321 100644 --- a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch +++ b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch @@ -1,4 +1,4 @@ -From 7dbc12290307517690e119452320858103500a7f Mon Sep 17 00:00:00 2001 +From 157f91f16c4c3e8bf3fb86756b9da2a9c5e4c7fd Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:59:22 +1000 Subject: [PATCH] Spam Filter Exclusions @@ -19,10 +19,10 @@ index 998ac8d..a292c1a 100644 Waitable waitable = new Waitable() { @Override diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 6234dca..3c32b08 100644 +index 042241c..d2d7ffc 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -199,4 +199,13 @@ public class SpigotConfig +@@ -201,4 +201,13 @@ public class SpigotConfig bungeeAddresses = getList( "settings.bungeecord-addresses", bungee ); bungee = getBoolean( "settings.bungeecord", true ); } diff --git a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch index 10e14d2..0fd0762 100644 --- a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch +++ b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch @@ -1,4 +1,4 @@ -From 36f3fc0a1175cf0b6dc14b0253de6ed6eb67fd58 Mon Sep 17 00:00:00 2001 +From c2e12f59e2d9d0ca80738e24565da4043c333413 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:01:29 +1000 Subject: [PATCH] Allow Disabling of Command Logging @@ -23,10 +23,10 @@ index a292c1a..0e8d292 100644 org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot return; diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 3c32b08..e15bf25 100644 +index d2d7ffc..c7de211 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -208,4 +208,10 @@ public class SpigotConfig +@@ -210,4 +210,10 @@ public class SpigotConfig "/skill" } ) ); } diff --git a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch index 845d0dd..48eaf1f 100644 --- a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch +++ b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch @@ -1,14 +1,14 @@ -From 61994fd6edb1fc608e913d2008fb7ec602c3056e Mon Sep 17 00:00:00 2001 +From c92028eb307ed2d2a654b54df8e3e0123352864f Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:05:54 +1000 Subject: [PATCH] Allow Disabling of Command TabComplete diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7534188..4d030b0 100644 +index 1fcbd33..42600a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1353,7 +1353,7 @@ public final class CraftServer implements Server { +@@ -1355,7 +1355,7 @@ public final class CraftServer implements Server { public List tabCompleteCommand(Player player, String message) { List completions = null; try { @@ -18,10 +18,10 @@ index 7534188..4d030b0 100644 player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index e15bf25..8ac5e41 100644 +index c7de211..4b18e72 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -214,4 +214,10 @@ public class SpigotConfig +@@ -216,4 +216,10 @@ public class SpigotConfig { logCommands = getBoolean( "commands.log", true ); } diff --git a/CraftBukkit-Patches/0053-Configurable-Messages.patch b/CraftBukkit-Patches/0053-Configurable-Messages.patch index 8503d20..8f9b429 100644 --- a/CraftBukkit-Patches/0053-Configurable-Messages.patch +++ b/CraftBukkit-Patches/0053-Configurable-Messages.patch @@ -1,4 +1,4 @@ -From 6484c43dc5b08c4317b478c9e86d03c3bb2b43c9 Mon Sep 17 00:00:00 2001 +From 26b56fde0ad7602876b78a4f22e034936899a957 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 19:21:58 +1000 Subject: [PATCH] Configurable Messages @@ -18,10 +18,10 @@ index fe846af..edeefba 100644 String s2 = socketaddress.toString(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4d030b0..71ce507 100644 +index 42600a6..9d71ae3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -525,7 +525,7 @@ public final class CraftServer implements Server { +@@ -526,7 +526,7 @@ public final class CraftServer implements Server { return true; } @@ -31,7 +31,7 @@ index 4d030b0..71ce507 100644 return false; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index e91f364..992b9c7 100644 +index 4b18e72..147e407 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -15,6 +15,7 @@ import java.util.Map; @@ -40,9 +40,9 @@ index e91f364..992b9c7 100644 import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.command.Command; - import org.bukkit.command.SimpleCommandMap; import org.bukkit.configuration.file.YamlConfiguration; -@@ -220,4 +221,16 @@ public class SpigotConfig + import org.bukkit.craftbukkit.command.TicksPerSecondCommand; +@@ -222,4 +223,16 @@ public class SpigotConfig { tabComplete = getBoolean( "commands.tab-complete", true ); } From 6ec312912db30fd0ddd2dffaa31e72d389a85920 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 22 Jun 2013 14:16:11 +1000 Subject: [PATCH 39/40] Cactus Cactus Cactus Cactus Cactus --- CraftBukkit-Patches/0006-Crop-Growth-Rates.patch | 16 ++++++++-------- .../0010-Merge-tweaks-and-configuration.patch | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch index 9fbbcc2..c2699f9 100644 --- a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch +++ b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch @@ -1,4 +1,4 @@ -From e1460ee5d26b7d86cf40f75297367ac293712e1b Mon Sep 17 00:00:00 2001 +From abf5bc5b131b439231197b1a3159b0dcdc3c82ec Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:17:20 +1000 Subject: [PATCH] Crop Growth Rates @@ -132,7 +132,7 @@ index 8339a35..c7e2344 100644 if (l < 7) { diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 123fb7a..a929766 100644 +index 123fb7a..3ec38a1 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -70,4 +70,36 @@ public class SpigotWorldConfig @@ -154,22 +154,22 @@ index 123fb7a..a929766 100644 + log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + + caneModifier = getInt( "growth.cane-modifier", 100 ); -+ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ log( "Cane Growth Modifier: " + caneModifier + "%" ); + + melonModifier = getInt( "growth.melon-modifier", 100 ); -+ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ log( "Melon Growth Modifier: " + melonModifier + "%" ); + + mushroomModifier = getInt( "growth.mushroom-modifier", 100 ); -+ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ log( "Mushroom Growth Modifier: " + mushroomModifier + "%" ); + + pumpkinModifier = getInt( "growth.pumpkin-modifier", 100 ); -+ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ log( "Pumpkin Growth Modifier: " + pumpkinModifier + "%" ); + + saplingModifier = getInt( "growth.sapling-modifier", 100 ); -+ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ log( "Sapling Growth Modifier: " + saplingModifier + "%" ); + + wheatModifier = getInt( "growth.wheat-modifier", 100 ); -+ log( "Cactus Growth Modifier: " + cactusModifier + "%" ); ++ log( "Wheat Growth Modifier: " + wheatModifier + "%" ); + } } -- diff --git a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch index 4236cc6..5f9983a 100644 --- a/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch +++ b/CraftBukkit-Patches/0010-Merge-tweaks-and-configuration.patch @@ -1,4 +1,4 @@ -From dcf6e48a2c498079f9c10f19242ee3a8869101d7 Mon Sep 17 00:00:00 2001 +From 7ec8ae26036858173a7c318944efa17ad2100cea 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 @@ -69,12 +69,12 @@ index afe3e4d..97da2cd 100644 if (event != null && (event.isCancelled() || entity.dead)) { entity.dead = true; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index a929766..ea7c211 100644 +index 3ec38a1..8a6d656 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -102,4 +102,18 @@ public class SpigotWorldConfig wheatModifier = getInt( "growth.wheat-modifier", 100 ); - log( "Cactus Growth Modifier: " + cactusModifier + "%" ); + log( "Wheat Growth Modifier: " + wheatModifier + "%" ); } + + public double itemMerge; From 66a73948069838163bb343412364c4cd40e7ca53 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 22 Jun 2013 14:35:20 +1000 Subject: [PATCH 40/40] Add netty-threads option --- CraftBukkit-Patches/0025-Netty.patch | 23 ++++++++++++------- .../0030-BungeeCord-Support.patch | 10 ++++---- .../0050-Spam-Filter-Exclusions.patch | 6 ++--- ...1-Allow-Disabling-of-Command-Logging.patch | 6 ++--- ...low-Disabling-of-Command-TabComplete.patch | 6 ++--- .../0053-Configurable-Messages.patch | 6 ++--- 6 files changed, 32 insertions(+), 25 deletions(-) diff --git a/CraftBukkit-Patches/0025-Netty.patch b/CraftBukkit-Patches/0025-Netty.patch index 1e946d4..3a60c71 100644 --- a/CraftBukkit-Patches/0025-Netty.patch +++ b/CraftBukkit-Patches/0025-Netty.patch @@ -1,4 +1,4 @@ -From 33f4ba2034fd8cd22a8b9da2115c25000154c038 Mon Sep 17 00:00:00 2001 +From 7186970386ca7b9887fc79e00510154f2b248d86 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:23:00 +1000 Subject: [PATCH] Netty @@ -350,7 +350,7 @@ index 0000000..386c2f8 + } +} diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index b7f3896..606b01e 100644 +index b7f3896..910d0de 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -6,6 +6,8 @@ import java.io.IOException; @@ -362,7 +362,7 @@ index b7f3896..606b01e 100644 import java.util.HashMap; import java.util.List; import java.util.Map; -@@ -148,4 +150,44 @@ public class SpigotConfig +@@ -148,4 +150,47 @@ public class SpigotConfig commands.put( "restart", new RestartCommand( "restart" ) ); WatchdogThread.doStart( timeoutTime, restartOnCrash ); } @@ -384,6 +384,7 @@ index b7f3896..606b01e 100644 + } + } + public static List listeners = new ArrayList(); ++ public static int nettyThreads; + private static void listeners() + { + Map def = new HashMap(); @@ -405,6 +406,8 @@ index b7f3896..606b01e 100644 + long connectionThrottle = ( info.get( "throttle" ) instanceof Number ) ? ( (Number) info.get( "throttle" ) ).longValue() : Bukkit.getConnectionThrottle(); + listeners.add( new Listener( host, port, netty, connectionThrottle ) ); + } ++ ++ nettyThreads = getInt( "settings.netty-threads", 3 ); + } } diff --git a/src/main/java/org/spigotmc/netty/CipherBase.java b/src/main/java/org/spigotmc/netty/CipherBase.java @@ -825,10 +828,10 @@ index 0000000..fdef0c8 +} diff --git a/src/main/java/org/spigotmc/netty/NettyServerConnection.java b/src/main/java/org/spigotmc/netty/NettyServerConnection.java new file mode 100644 -index 0000000..575db8b +index 0000000..f232efd --- /dev/null +++ b/src/main/java/org/spigotmc/netty/NettyServerConnection.java -@@ -0,0 +1,100 @@ +@@ -0,0 +1,104 @@ +package org.spigotmc.netty; + +import com.google.common.util.concurrent.ThreadFactoryBuilder; @@ -838,6 +841,7 @@ index 0000000..575db8b +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; ++import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.nio.NioServerSocketChannel; +import io.netty.handler.timeout.ReadTimeoutHandler; @@ -861,11 +865,15 @@ index 0000000..575db8b +{ + + private final ChannelFuture socket; ++ private static EventLoopGroup group; + + public NettyServerConnection(final MinecraftServer ms, InetAddress host, int port) + { + super( ms ); -+ int threads = Integer.getInteger( "org.spigotmc.netty.threads", 3 ); ++ if ( group == null ) ++ { ++ group = new NioEventLoopGroup( org.spigotmc.SpigotConfig.nettyThreads, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread - %1$d" ).build() ); ++ } + socket = new ServerBootstrap().channel( NioServerSocketChannel.class ).childHandler( new ChannelInitializer() + { + @Override @@ -894,8 +902,7 @@ index 0000000..575db8b + .addLast( "encoder", new PacketEncoder( networkManager ) ) + .addLast( "manager", networkManager ); + } -+ } ).childOption( ChannelOption.TCP_NODELAY, false ).group( new NioEventLoopGroup( threads, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread - %1$d" ).build() ) ).localAddress( host, port ).bind(); -+ MinecraftServer.getServer().getLogger().info( "Using Netty NIO with " + threads + " threads for network connections." ); ++ } ).childOption( ChannelOption.TCP_NODELAY, false ).group( group ).localAddress( host, port ).bind(); + } + + /** diff --git a/CraftBukkit-Patches/0030-BungeeCord-Support.patch b/CraftBukkit-Patches/0030-BungeeCord-Support.patch index b8af01e..5e98711 100644 --- a/CraftBukkit-Patches/0030-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0030-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From 2aec923f52118621b312e361b2a38b3b92c185c2 Mon Sep 17 00:00:00 2001 +From 150ae92bc058a84187b9c27bd4f65ff27728638d Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -75,7 +75,7 @@ index 7cae665..21141f2 100644 public Spigot spigot() diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 606b01e..042241c 100644 +index 910d0de..b71d425 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -7,6 +7,7 @@ import java.lang.reflect.InvocationTargetException; @@ -86,9 +86,9 @@ index 606b01e..042241c 100644 import java.util.Collections; import java.util.HashMap; import java.util.List; -@@ -190,4 +191,14 @@ public class SpigotConfig - listeners.add( new Listener( host, port, netty, connectionThrottle ) ); - } +@@ -193,4 +194,14 @@ public class SpigotConfig + + nettyThreads = getInt( "settings.netty-threads", 3 ); } + public static List bungeeAddresses = Arrays.asList( new String[] + { diff --git a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch index 7483321..272fa30 100644 --- a/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch +++ b/CraftBukkit-Patches/0050-Spam-Filter-Exclusions.patch @@ -1,4 +1,4 @@ -From 157f91f16c4c3e8bf3fb86756b9da2a9c5e4c7fd Mon Sep 17 00:00:00 2001 +From ca4219456ce6b7f5ea1b18b4b7adce3fc08f9cf1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:59:22 +1000 Subject: [PATCH] Spam Filter Exclusions @@ -19,10 +19,10 @@ index 998ac8d..a292c1a 100644 Waitable waitable = new Waitable() { @Override diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 042241c..d2d7ffc 100644 +index b71d425..1685d9f 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -201,4 +201,13 @@ public class SpigotConfig +@@ -204,4 +204,13 @@ public class SpigotConfig bungeeAddresses = getList( "settings.bungeecord-addresses", bungee ); bungee = getBoolean( "settings.bungeecord", true ); } diff --git a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch index 0fd0762..e8e82db 100644 --- a/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch +++ b/CraftBukkit-Patches/0051-Allow-Disabling-of-Command-Logging.patch @@ -1,4 +1,4 @@ -From c2e12f59e2d9d0ca80738e24565da4043c333413 Mon Sep 17 00:00:00 2001 +From f78427a84375f14b3204f9891f62783c8c2840bb Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:01:29 +1000 Subject: [PATCH] Allow Disabling of Command Logging @@ -23,10 +23,10 @@ index a292c1a..0e8d292 100644 org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot return; diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index d2d7ffc..c7de211 100644 +index 1685d9f..9214f16 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -210,4 +210,10 @@ public class SpigotConfig +@@ -213,4 +213,10 @@ public class SpigotConfig "/skill" } ) ); } diff --git a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch index 48eaf1f..4971249 100644 --- a/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch +++ b/CraftBukkit-Patches/0052-Allow-Disabling-of-Command-TabComplete.patch @@ -1,4 +1,4 @@ -From c92028eb307ed2d2a654b54df8e3e0123352864f Mon Sep 17 00:00:00 2001 +From ef86c38f34b99933811189b6710f79cdfe593557 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:05:54 +1000 Subject: [PATCH] Allow Disabling of Command TabComplete @@ -18,10 +18,10 @@ index 1fcbd33..42600a6 100644 player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index c7de211..4b18e72 100644 +index 9214f16..3cccb72 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -216,4 +216,10 @@ public class SpigotConfig +@@ -219,4 +219,10 @@ public class SpigotConfig { logCommands = getBoolean( "commands.log", true ); } diff --git a/CraftBukkit-Patches/0053-Configurable-Messages.patch b/CraftBukkit-Patches/0053-Configurable-Messages.patch index 8f9b429..184702f 100644 --- a/CraftBukkit-Patches/0053-Configurable-Messages.patch +++ b/CraftBukkit-Patches/0053-Configurable-Messages.patch @@ -1,4 +1,4 @@ -From 26b56fde0ad7602876b78a4f22e034936899a957 Mon Sep 17 00:00:00 2001 +From 866aee41f87d8a15b7181248f1f36076e818c67a Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 19:21:58 +1000 Subject: [PATCH] Configurable Messages @@ -31,7 +31,7 @@ index 42600a6..9d71ae3 100644 return false; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 4b18e72..147e407 100644 +index 3cccb72..102c5fa 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -15,6 +15,7 @@ import java.util.Map; @@ -42,7 +42,7 @@ index 4b18e72..147e407 100644 import org.bukkit.command.Command; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.craftbukkit.command.TicksPerSecondCommand; -@@ -222,4 +223,16 @@ public class SpigotConfig +@@ -225,4 +226,16 @@ public class SpigotConfig { tabComplete = getBoolean( "commands.tab-complete", true ); }