Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +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) {
|
||||
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,
|
||||
Collections.emptyList());
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ import io.netty.buffer.ByteBuf;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -168,6 +169,7 @@ public class StatusSessionHandler implements MinecraftSessionHandler {
|
||||
return CompletableFuture.completedFuture(constructLocalPing(shownVersion));
|
||||
} else {
|
||||
String virtualHostStr = inbound.connectedHost().map(InetSocketAddress::getHostString)
|
||||
.map(str -> str.toLowerCase(Locale.ROOT))
|
||||
.orElse("");
|
||||
List<String> serversToTry = server.configuration().getForcedHosts().getOrDefault(
|
||||
virtualHostStr, server.configuration().getAttemptConnectionOrder());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren