diff --git a/CraftBukkit-Patches/0005-Spigot-Configuration.patch b/CraftBukkit-Patches/0005-Spigot-Configuration.patch index ed8062a0f1..17f19fab35 100644 --- a/CraftBukkit-Patches/0005-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0005-Spigot-Configuration.patch @@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + // Spigot start + this.a((PlayerList) (new DedicatedPlayerList(this))); -+ org.spigotmc.SpigotConfig.init(); ++ org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings")); + org.spigotmc.SpigotConfig.registerCommands(); + // Spigot end @@ -75,7 +75,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 logger.log(Level.WARNING, "Failed to load banned-players.json, " + ex.getMessage()); } -+ org.spigotmc.SpigotConfig.init(); // Spigot ++ org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot for (WorldServer world : console.worlds) { world.worldData.setDifficulty(difficulty); world.setSpawnFlags(monsters, animals); @@ -94,6 +94,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); int pollCount = 0; +diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/Main.java ++++ b/src/main/java/org/bukkit/craftbukkit/Main.java +@@ -0,0 +0,0 @@ public class Main { + acceptsAll(asList("v", "version"), "Show the CraftBukkit Version"); + + acceptsAll(asList("demo"), "Demo mode"); ++ ++ // Spigot Start ++ acceptsAll(asList("S", "spigot-settings"), "File for spigot settings") ++ .withRequiredArg() ++ .ofType(File.class) ++ .defaultsTo(new File("spigot.yml")) ++ .describedAs("Yml file"); ++ // Spigot End + } + }; + diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 @@ -121,7 +140,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +public class SpigotConfig +{ + -+ private static final File CONFIG_FILE = new File( "spigot.yml" ); ++ private static File CONFIG_FILE; + 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" @@ -139,8 +158,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + static Map commands; + /*========================================================================*/ + -+ public static void init() ++ public static void init(File configFile) + { ++ CONFIG_FILE = configFile; + config = new YamlConfiguration(); + try + { @@ -315,4 +335,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); + } +} --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0015-Metrics.patch b/CraftBukkit-Patches/0015-Metrics.patch index 29976c881b..718f728ea6 100644 --- a/CraftBukkit-Patches/0015-Metrics.patch +++ b/CraftBukkit-Patches/0015-Metrics.patch @@ -665,7 +665,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /*========================================================================*/ + private static Metrics metrics; - public static void init() + public static void init(File configFile) { @@ -0,0 +0,0 @@ public class SpigotConfig { @@ -686,4 +686,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } static void readConfig(Class clazz, Object instance) --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0027-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0027-Allow-Disabling-of-Command-Logging.patch index 3b1e99d085..662403ac66 100644 --- a/CraftBukkit-Patches/0027-Allow-Disabling-of-Command-Logging.patch +++ b/CraftBukkit-Patches/0027-Allow-Disabling-of-Command-Logging.patch @@ -31,4 +31,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + logCommands = getBoolean( "commands.log", true ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0028-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0028-Allow-Disabling-of-Command-TabComplete.patch index ab9879cdea..04a511adaa 100644 --- a/CraftBukkit-Patches/0028-Allow-Disabling-of-Command-TabComplete.patch +++ b/CraftBukkit-Patches/0028-Allow-Disabling-of-Command-TabComplete.patch @@ -48,4 +48,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + tabComplete = getInt( "commands.tab-complete", 0 ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0029-Configurable-Messages.patch b/CraftBukkit-Patches/0029-Configurable-Messages.patch index 85632c7814..1cf510fce2 100644 --- a/CraftBukkit-Patches/0029-Configurable-Messages.patch +++ b/CraftBukkit-Patches/0029-Configurable-Messages.patch @@ -102,4 +102,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + outdatedServerMessage = transform( getString( "messages.outdated-server", outdatedServerMessage ) ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0048-Watchdog-Thread.patch b/CraftBukkit-Patches/0048-Watchdog-Thread.patch index 0f3eabe4de..a5fff434b1 100644 --- a/CraftBukkit-Patches/0048-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0048-Watchdog-Thread.patch @@ -313,4 +313,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } +} --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0055-BungeeCord-Support.patch b/CraftBukkit-Patches/0055-BungeeCord-Support.patch index c82519ce9d..40dd7f8057 100644 --- a/CraftBukkit-Patches/0055-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0055-BungeeCord-Support.patch @@ -211,4 +211,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + bungee = getBoolean( "settings.bungeecord", false ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0057-Configurable-Amount-of-Netty-Threads.patch b/CraftBukkit-Patches/0057-Configurable-Amount-of-Netty-Threads.patch index 8b588e2d3d..475c58ae18 100644 --- a/CraftBukkit-Patches/0057-Configurable-Amount-of-Netty-Threads.patch +++ b/CraftBukkit-Patches/0057-Configurable-Amount-of-Netty-Threads.patch @@ -52,4 +52,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + Bukkit.getLogger().log( Level.INFO, "Using {0} threads for Netty based IO", count ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0064-Warn-if-PermGen-may-be-insufficient.patch b/CraftBukkit-Patches/0064-Warn-if-PermGen-may-be-insufficient.patch index 12d94f7282..fd6fd9d42b 100644 --- a/CraftBukkit-Patches/0064-Warn-if-PermGen-may-be-insufficient.patch +++ b/CraftBukkit-Patches/0064-Warn-if-PermGen-may-be-insufficient.patch @@ -31,4 +31,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 System.out.println("Loading libraries, please wait..."); MinecraftServer.main(options); } catch (Throwable t) { --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0066-Add-Late-Bind-Option.patch b/CraftBukkit-Patches/0066-Add-Late-Bind-Option.patch index 917f8ab5d1..8d01dfe5a7 100644 --- a/CraftBukkit-Patches/0066-Add-Late-Bind-Option.patch +++ b/CraftBukkit-Patches/0066-Add-Late-Bind-Option.patch @@ -57,4 +57,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + lateBind = getBoolean( "settings.late-bind", false ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0067-Allow-statistics-to-be-disabled-forced.patch b/CraftBukkit-Patches/0067-Allow-statistics-to-be-disabled-forced.patch index e66bd7192f..a125890d8e 100644 --- a/CraftBukkit-Patches/0067-Allow-statistics-to-be-disabled-forced.patch +++ b/CraftBukkit-Patches/0067-Allow-statistics-to-be-disabled-forced.patch @@ -88,4 +88,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0073-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0073-Highly-Optimized-Tick-Loop.patch index 9afa9a7e6a..9f4679ef2e 100644 --- a/CraftBukkit-Patches/0073-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0073-Highly-Optimized-Tick-Loop.patch @@ -160,4 +160,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); + } +} --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0075-Configurable-Ping-Sample-Size.patch b/CraftBukkit-Patches/0075-Configurable-Ping-Sample-Size.patch index be99278f00..d0dda068b6 100644 --- a/CraftBukkit-Patches/0075-Configurable-Ping-Sample-Size.patch +++ b/CraftBukkit-Patches/0075-Configurable-Ping-Sample-Size.patch @@ -38,4 +38,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + System.out.println( "Server Ping Player Sample Count: " + playerSample ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0076-Add-Optional-Tick-Shuffling.patch b/CraftBukkit-Patches/0076-Add-Optional-Tick-Shuffling.patch index 96ad363d0b..59ca7141b7 100644 --- a/CraftBukkit-Patches/0076-Add-Optional-Tick-Shuffling.patch +++ b/CraftBukkit-Patches/0076-Add-Optional-Tick-Shuffling.patch @@ -38,4 +38,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + playerShuffle = getInt( "settings.player-shuffle", 0 ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0081-Spam-Filter-Exclusions.patch b/CraftBukkit-Patches/0081-Spam-Filter-Exclusions.patch index 58ec815e8d..0840a9e2db 100644 --- a/CraftBukkit-Patches/0081-Spam-Filter-Exclusions.patch +++ b/CraftBukkit-Patches/0081-Spam-Filter-Exclusions.patch @@ -56,4 +56,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } ) ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0082-Add-Option-to-Silence-CommandBlock-Console.patch b/CraftBukkit-Patches/0082-Add-Option-to-Silence-CommandBlock-Console.patch index 604ae1e8a9..d806d997a1 100644 --- a/CraftBukkit-Patches/0082-Add-Option-to-Silence-CommandBlock-Console.patch +++ b/CraftBukkit-Patches/0082-Add-Option-to-Silence-CommandBlock-Console.patch @@ -32,4 +32,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0084-Allow-Disabling-Creative-Item-Filter.patch b/CraftBukkit-Patches/0084-Allow-Disabling-Creative-Item-Filter.patch index dcdbd5827a..73aaf92faf 100644 --- a/CraftBukkit-Patches/0084-Allow-Disabling-Creative-Item-Filter.patch +++ b/CraftBukkit-Patches/0084-Allow-Disabling-Creative-Item-Filter.patch @@ -32,4 +32,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + filterCreativeItems = getBoolean( "settings.filter-creative-items", true ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0086-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch b/CraftBukkit-Patches/0086-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch index b97a831736..6f4c61421c 100644 --- a/CraftBukkit-Patches/0086-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch +++ b/CraftBukkit-Patches/0086-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch @@ -75,4 +75,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + Arrays.asList( "setblock", "summon", "testforblock", "tellraw" ) ) ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0116-Configurable-UserCache-cap.patch b/CraftBukkit-Patches/0116-Configurable-UserCache-cap.patch index 7df68c5ad2..821827e35e 100644 --- a/CraftBukkit-Patches/0116-Configurable-UserCache-cap.patch +++ b/CraftBukkit-Patches/0116-Configurable-UserCache-cap.patch @@ -32,4 +32,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + userCacheCap = getInt( "settings.user-cache-size", 1000 ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0120-Configurable-save-on-stop-only-for-UserCache.patch b/CraftBukkit-Patches/0120-Configurable-save-on-stop-only-for-UserCache.patch index d63f5d474f..54c50f9eb6 100644 --- a/CraftBukkit-Patches/0120-Configurable-save-on-stop-only-for-UserCache.patch +++ b/CraftBukkit-Patches/0120-Configurable-save-on-stop-only-for-UserCache.patch @@ -51,4 +51,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + saveUserCacheOnStopOnly = getBoolean( "settings.save-user-cache-on-stop-only", false ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0121-Prevent-Unbounded-IntCache-Growth.patch b/CraftBukkit-Patches/0121-Prevent-Unbounded-IntCache-Growth.patch index f61e9ace8b..f5ed2d65fe 100644 --- a/CraftBukkit-Patches/0121-Prevent-Unbounded-IntCache-Growth.patch +++ b/CraftBukkit-Patches/0121-Prevent-Unbounded-IntCache-Growth.patch @@ -57,4 +57,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + intCacheLimit = getInt( "settings.int-cache-limit", 1024 ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0135-Make-moved-wrongly-limit-configurable.patch b/CraftBukkit-Patches/0135-Make-moved-wrongly-limit-configurable.patch index 2346256e9c..3a68a50672 100644 --- a/CraftBukkit-Patches/0135-Make-moved-wrongly-limit-configurable.patch +++ b/CraftBukkit-Patches/0135-Make-moved-wrongly-limit-configurable.patch @@ -33,4 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + movedWronglyThreshold = getDouble( "settings.moved-wrongly-threshold", 0.0625D ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0137-Make-moved-too-quickly-limit-configurable.patch b/CraftBukkit-Patches/0137-Make-moved-too-quickly-limit-configurable.patch index d826a7e803..4936e81675 100644 --- a/CraftBukkit-Patches/0137-Make-moved-too-quickly-limit-configurable.patch +++ b/CraftBukkit-Patches/0137-Make-moved-too-quickly-limit-configurable.patch @@ -33,4 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + movedTooQuicklyThreshold = getDouble( "settings.moved-too-quickly-threshold", 100.0D ); + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0139-Allow-Attribute-Capping.patch b/CraftBukkit-Patches/0139-Allow-Attribute-Capping.patch index 6eb5c6d76e..87af81b50a 100644 --- a/CraftBukkit-Patches/0139-Allow-Attribute-Capping.patch +++ b/CraftBukkit-Patches/0139-Allow-Attribute-Capping.patch @@ -70,4 +70,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + ( (AttributeRanged) GenericAttributes.ATTACK_DAMAGE ).b = attackDamage; + } } --- \ No newline at end of file +-- +1.9.0.msysgit.0 + diff --git a/CraftBukkit-Patches/0146-Make-debug-logging-togglable.patch b/CraftBukkit-Patches/0146-Make-debug-logging-togglable.patch index 6dafbdbea4..79d2ef6197 100644 --- a/CraftBukkit-Patches/0146-Make-debug-logging-togglable.patch +++ b/CraftBukkit-Patches/0146-Make-debug-logging-togglable.patch @@ -62,4 +62,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- \ No newline at end of file +-- +1.9.0.msysgit.0 +