mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-19 14:59:20 +00:00
Remove Geyser -> Bungee Floodgate data after use
This commit is contained in:
@@ -121,6 +121,8 @@ public class BungeeProxyDataHandler extends ChannelInboundHandlerAdapter {
|
|||||||
channelWrapper.setRemoteAddress(newIp);
|
channelWrapper.setRemoteAddress(newIp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
packet.setHost(handshakeData.getHostname());
|
||||||
|
|
||||||
if (handshakeData.getDisconnectReason() != null) {
|
if (handshakeData.getDisconnectReason() != null) {
|
||||||
ctx.channel().attr(kickMessageAttribute).set(handshakeData.getDisconnectReason());
|
ctx.channel().attr(kickMessageAttribute).set(handshakeData.getDisconnectReason());
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -67,8 +67,7 @@ public class BungeeServerDataHandler extends ChannelOutboundHandlerAdapter {
|
|||||||
private final AttributeKey<FloodgatePlayer> playerAttribute;
|
private final AttributeKey<FloodgatePlayer> playerAttribute;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(ChannelHandlerContext ctx, Object packet, ChannelPromise promise)
|
public void write(ChannelHandlerContext ctx, Object packet, ChannelPromise promise) {
|
||||||
throws Exception {
|
|
||||||
if (packet instanceof Handshake) {
|
if (packet instanceof Handshake) {
|
||||||
// get the Proxy <-> Player channel from the Proxy <-> Server channel
|
// get the Proxy <-> Player channel from the Proxy <-> Server channel
|
||||||
HandlerBoss handlerBoss = ctx.pipeline().get(HandlerBoss.class);
|
HandlerBoss handlerBoss = ctx.pipeline().get(HandlerBoss.class);
|
||||||
|
|||||||
@@ -119,6 +119,8 @@ public final class VelocityProxyDataHandler extends ChannelInboundHandlerAdapter
|
|||||||
setValue(connection, REMOTE_ADDRESS, newIp);
|
setValue(connection, REMOTE_ADDRESS, newIp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setValue(packet, HANDSHAKE_SERVER_ADDRESS, handshakeData.getHostname());
|
||||||
|
|
||||||
if (handshakeData.getDisconnectReason() != null) {
|
if (handshakeData.getDisconnectReason() != null) {
|
||||||
ctx.channel().attr(kickMessageAttribute).set(handshakeData.getDisconnectReason());
|
ctx.channel().attr(kickMessageAttribute).set(handshakeData.getDisconnectReason());
|
||||||
return;
|
return;
|
||||||
@@ -149,8 +151,6 @@ public final class VelocityProxyDataHandler extends ChannelInboundHandlerAdapter
|
|||||||
|
|
||||||
FloodgatePlayer player = result.getFloodgatePlayer();
|
FloodgatePlayer player = result.getFloodgatePlayer();
|
||||||
|
|
||||||
setValue(packet, HANDSHAKE_SERVER_ADDRESS, handshakeData.getHostname());
|
|
||||||
|
|
||||||
logger.info("Floodgate player who is logged in as {} {} joined",
|
logger.info("Floodgate player who is logged in as {} {} joined",
|
||||||
player.getCorrectUsername(), player.getCorrectUniqueId());
|
player.getCorrectUsername(), player.getCorrectUniqueId());
|
||||||
}).handle((v, error) -> {
|
}).handle((v, error) -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user