forked from git-mirrors/GeyserConnect
Fix issues with hostnames on PS4
This commit is contained in:
parent
9c803c3355
commit
d180ab3795
1 changed files with 7 additions and 2 deletions
|
@ -43,6 +43,7 @@ import org.geysermc.connect.ui.FormID;
|
||||||
import org.geysermc.connect.ui.UIHandler;
|
import org.geysermc.connect.ui.UIHandler;
|
||||||
import org.geysermc.connector.network.session.auth.BedrockClientData;
|
import org.geysermc.connector.network.session.auth.BedrockClientData;
|
||||||
|
|
||||||
|
import java.net.InetSocketAddress;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -209,9 +210,13 @@ public class Player {
|
||||||
port = currentServer.getPort();
|
port = currentServer.getPort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create an InetSocketAddress to reduce issues with hostnames for PS4
|
||||||
|
// Thanks Extollite
|
||||||
|
InetSocketAddress socketAddress = new InetSocketAddress(address, port);
|
||||||
|
|
||||||
TransferPacket transferPacket = new TransferPacket();
|
TransferPacket transferPacket = new TransferPacket();
|
||||||
transferPacket.setAddress(address);
|
transferPacket.setAddress(socketAddress.getAddress().getHostAddress());
|
||||||
transferPacket.setPort(port);
|
transferPacket.setPort(socketAddress.getPort());
|
||||||
session.sendPacket(transferPacket);
|
session.sendPacket(transferPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue