3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00

Set connection thottle to -1 when Velocity IP forwarding is enabled

Port of 3c6f46936e
Dieser Commit ist enthalten in:
Mark Vainomaa 2019-06-02 21:58:14 -05:00 committet von Zach Brown
Ursprung da0aa69e44
Commit 68eec9621f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76

Datei anzeigen

@ -1,4 +1,4 @@
From 11e86765bb25800e0b6c6a030e4f9f5d14000f2f Mon Sep 17 00:00:00 2001
From a1f8c1906de53521774263e39bb27d64fe3ab6f3 Mon Sep 17 00:00:00 2001
From: Andrew Steinborn <git@steinborn.me>
Date: Mon, 8 Oct 2018 14:36:14 -0400
Subject: [PATCH] Add Velocity IP Forwarding Support
@ -277,6 +277,19 @@ index ae74dc9e1..7eb230f1b 100644
@Override
public void a(PacketDataSerializer packetdataserializer) throws IOException {
this.a = packetdataserializer.i();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 88c6d1d02..e667bfb70 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -641,7 +641,7 @@ public final class CraftServer implements Server {
@Override
public long getConnectionThrottle() {
// Spigot Start - Automatically set connection throttle for bungee configurations
- if (org.spigotmc.SpigotConfig.bungee) {
+ if (org.spigotmc.SpigotConfig.bungee || com.destroystokyo.paper.PaperConfig.velocitySupport) { // Paper - Velocity support
return -1;
} else {
return this.configuration.getInt("settings.connection-throttle");
--
2.21.0