3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00

Automatically set connection throttle for bungee configurations

Dieser Commit ist enthalten in:
Zach Brown 2014-05-04 22:59:31 -05:00 committet von md_5
Ursprung 57ffba423f
Commit 928f6e1ea3

Datei anzeigen

@ -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