mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-21 15:59:21 +00:00
Fixed handshake data bug
This commit is contained in:
@@ -73,7 +73,7 @@ public final class FloodgateHandshakeHandler {
|
|||||||
data = value;
|
data = value;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
hostnameBuilder.append(value);
|
hostnameBuilder.append(value).append('\0');
|
||||||
}
|
}
|
||||||
// hostname now doesn't have Floodgate data anymore if it had
|
// hostname now doesn't have Floodgate data anymore if it had
|
||||||
String hostname = hostnameBuilder.toString();
|
String hostname = hostnameBuilder.toString();
|
||||||
|
|||||||
@@ -180,6 +180,9 @@ public final class SpigotDataHandler extends ChannelInboundHandlerAdapter {
|
|||||||
HandshakeResult result = handshakeHandler.handle(ctx.channel(), handshakeValue);
|
HandshakeResult result = handshakeHandler.handle(ctx.channel(), handshakeValue);
|
||||||
HandshakeData handshakeData = result.getHandshakeData();
|
HandshakeData handshakeData = result.getHandshakeData();
|
||||||
|
|
||||||
|
setValue(packet, HANDSHAKE_HOST, handshakeData.getHostname());
|
||||||
|
logger.info(handshakeData.getHostname());
|
||||||
|
|
||||||
if (handshakeData.getDisconnectReason() != null) {
|
if (handshakeData.getDisconnectReason() != null) {
|
||||||
ctx.close(); // todo disconnect with message
|
ctx.close(); // todo disconnect with message
|
||||||
return;
|
return;
|
||||||
@@ -203,8 +206,6 @@ public final class SpigotDataHandler extends ChannelInboundHandlerAdapter {
|
|||||||
player = result.getFloodgatePlayer();
|
player = result.getFloodgatePlayer();
|
||||||
bungeeData = SpigotUtils.isBungeeData();
|
bungeeData = SpigotUtils.isBungeeData();
|
||||||
|
|
||||||
setValue(packet, HANDSHAKE_HOST, handshakeData.getHostname());
|
|
||||||
|
|
||||||
if (!bungeeData) {
|
if (!bungeeData) {
|
||||||
// Use a spoofedUUID for initUUID (just like Bungeecord)
|
// Use a spoofedUUID for initUUID (just like Bungeecord)
|
||||||
setValue(networkManager, "spoofedUUID", player.getCorrectUniqueId());
|
setValue(networkManager, "spoofedUUID", player.getCorrectUniqueId());
|
||||||
|
|||||||
Reference in New Issue
Block a user