Automatically set connection throttle for bungee configurations
This commit is contained in:
parent
57ffba423f
commit
928f6e1ea3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue