Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Fix bug in ConnectOther message
Credits to @Jay113355 for spotting this
Dieser Commit ist enthalten in:
Ursprung
24c9fc0ef1
Commit
2b84d35798
@ -15,6 +15,7 @@ import com.velocitypowered.proxy.protocol.util.ByteBufDataOutput;
|
||||
import com.velocitypowered.proxy.server.VelocityRegisteredServer;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import java.util.Optional;
|
||||
import java.util.StringJoiner;
|
||||
import net.kyori.text.serializer.legacy.LegacyComponentSerializer;
|
||||
|
||||
@ -43,8 +44,11 @@ class BungeeCordMessageResponder {
|
||||
String playerName = in.readUTF();
|
||||
String serverName = in.readUTF();
|
||||
|
||||
proxy.getPlayer(playerName).flatMap(player -> proxy.getServer(serverName))
|
||||
.ifPresent(server -> player.createConnectionRequest(server).fireAndForget());
|
||||
Optional<Player> referencedPlayer = proxy.getPlayer(playerName);
|
||||
Optional<RegisteredServer> referencedServer = proxy.getServer(serverName);
|
||||
if (referencedPlayer.isPresent() && referencedServer.isPresent()) {
|
||||
referencedPlayer.get().createConnectionRequest(referencedServer.get()).fireAndForget();
|
||||
}
|
||||
}
|
||||
|
||||
private void processIp(ByteBufDataInput in) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren