Fixed ViaBedrock transfer provider

This commit is contained in:
RaphiMC 2024-01-02 01:21:25 +01:00
parent 3d18dad3c8
commit d6dff8998f
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94

View File

@ -29,7 +29,7 @@ public class ViaProxyTransferProvider extends TransferProvider {
@Override
public void connectToServer(UserConnection user, InetSocketAddress newAddress) {
ViaBedrockTransferHolder.addTempRedirect(user.getChannel(), newAddress);
ViaBedrockTransferHolder.addTempRedirect(ProxyConnection.fromChannel(user.getChannel()).getC2P(), newAddress);
try {
ProxyConnection.fromUserConnection(user).kickClient("§aThe server transferred you to another server §7(§e" + newAddress.getHostName() + ":" + newAddress.getPort() + "§7)§a. Please reconnect to ViaProxy.");
} catch (CloseAndReturn ignored) {