3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-23 23:00:35 +01:00

Do not write plugin messages from the server if the player hasn't joined

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-09-14 15:26:51 -04:00
Ursprung 9776675b70
Commit e9568e1b6c

Datei anzeigen

@ -300,18 +300,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
MessageHandler.ForwardStatus status = server.getChannelRegistrar().handlePluginMessage(player,
ChannelSide.FROM_CLIENT, packet);
if (status == MessageHandler.ForwardStatus.FORWARD) {
String channel = packet.getChannel();
// We're going to forward on the original packet.
//
// If we have Forge messages, we may need to drop them if the server switch has
// not completed yet.
if (channel.equals(VelocityConstants.FORGE_LEGACY_CHANNEL)
|| channel.equals(VelocityConstants.FORGE_MULTIPART_LEGACY_CHANNEL)) {
player.getConnectedServer().writeIfJoined(packet);
} else {
player.getConnectedServer().getMinecraftConnection().write(packet);
}
player.getConnectedServer().writeIfJoined(packet);
}
}