From 928f6e1ea3a0fcd7a82168a801897c03b6cb4eee Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 4 May 2014 22:59:31 -0500 Subject: [PATCH] Automatically set connection throttle for bungee configurations --- .../0066-BungeeCord-Support.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CraftBukkit-Patches/0066-BungeeCord-Support.patch b/CraftBukkit-Patches/0066-BungeeCord-Support.patch index 85887a66f..8f1eaf916 100644 --- a/CraftBukkit-Patches/0066-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0066-BungeeCord-Support.patch @@ -5,6 +5,25 @@ Subject: [PATCH] BungeeCord Support Provides support for IP forwarding via BungeeCord. +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index d160b96..06b1ee7 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -663,7 +663,13 @@ public final class CraftServer implements Server { + } + + public long getConnectionThrottle() { +- return this.configuration.getInt("settings.connection-throttle"); ++ // Spigot Start - Automatically set connection throttle for bungee configurations ++ if (org.spigotmc.SpigotConfig.bungee) { ++ return -1; ++ } else { ++ return this.configuration.getInt("settings.connection-throttle"); ++ } ++ // Spigot End + } + + public int getTicksPerAnimalSpawns() { diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java index b98079c..ee24038 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java