Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 13:30:17 +01:00
Reapply f1cb3eb
and add the same fix to ping passthrough
Dieser Commit ist enthalten in:
Ursprung
a5565847d1
Commit
e416b9fc45
@ -616,7 +616,9 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
*/
|
*/
|
||||||
private Optional<RegisteredServer> getNextServerToTry(@Nullable RegisteredServer current) {
|
private Optional<RegisteredServer> getNextServerToTry(@Nullable RegisteredServer current) {
|
||||||
if (serversToTry == null) {
|
if (serversToTry == null) {
|
||||||
String virtualHostStr = connectedHost().map(InetSocketAddress::getHostString).orElse("");
|
String virtualHostStr = connectedHost().map(InetSocketAddress::getHostString)
|
||||||
|
.orElse("")
|
||||||
|
.toLowerCase(Locale.ROOT);
|
||||||
serversToTry = server.configuration().getForcedHosts().getOrDefault(virtualHostStr,
|
serversToTry = server.configuration().getForcedHosts().getOrDefault(virtualHostStr,
|
||||||
Collections.emptyList());
|
Collections.emptyList());
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
@ -168,6 +169,7 @@ public class StatusSessionHandler implements MinecraftSessionHandler {
|
|||||||
return CompletableFuture.completedFuture(constructLocalPing(shownVersion));
|
return CompletableFuture.completedFuture(constructLocalPing(shownVersion));
|
||||||
} else {
|
} else {
|
||||||
String virtualHostStr = inbound.connectedHost().map(InetSocketAddress::getHostString)
|
String virtualHostStr = inbound.connectedHost().map(InetSocketAddress::getHostString)
|
||||||
|
.map(str -> str.toLowerCase(Locale.ROOT))
|
||||||
.orElse("");
|
.orElse("");
|
||||||
List<String> serversToTry = server.configuration().getForcedHosts().getOrDefault(
|
List<String> serversToTry = server.configuration().getForcedHosts().getOrDefault(
|
||||||
virtualHostStr, server.configuration().getAttemptConnectionOrder());
|
virtualHostStr, server.configuration().getAttemptConnectionOrder());
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren