Automatically set connection throttle for bungee configurations

This commit is contained in:
Zach Brown 2014-05-04 22:59:31 -05:00 committed by md_5
parent 57ffba423f
commit 928f6e1ea3

View File

@ -5,6 +5,25 @@ Subject: [PATCH] BungeeCord Support
Provides support for IP forwarding via BungeeCord. 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 diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
index b98079c..ee24038 100644 index b98079c..ee24038 100644
--- a/src/main/java/net/minecraft/server/HandshakeListener.java --- a/src/main/java/net/minecraft/server/HandshakeListener.java