3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

appease checkstyle, move back to older fix placement

Dieser Commit ist enthalten in:
Shane Freeder 2023-10-10 18:21:02 +01:00
Ursprung 550ca58a09
Commit 05e5963660
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C
2 geänderte Dateien mit 8 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -18,7 +18,6 @@
package com.velocitypowered.proxy.connection.backend;
import static com.velocitypowered.proxy.connection.backend.BungeeCordMessageResponder.getBungeeCordChannel;
import static com.velocitypowered.proxy.protocol.util.PluginMessageUtil.constructChannelsPacket;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
@ -62,8 +61,6 @@ import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import io.netty.handler.timeout.ReadTimeoutException;
import java.util.Collection;
import java.util.regex.Pattern;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -115,13 +112,6 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
));
}
Collection<String> channels =
server.getChannelRegistrar().getChannelsForProtocol(serverConn.getPlayer().getProtocolVersion());
if (!channels.isEmpty()) {
PluginMessage register = constructChannelsPacket(serverConn.getPlayer().getProtocolVersion(), channels);
serverMc.write(register);
}
}
@Override

Datei anzeigen

@ -535,6 +535,14 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
}
serverBossBars.clear();
// Tell the server about the proxy's plugin message channels.
ProtocolVersion serverVersion = serverMc.getProtocolVersion();
final Collection<String> channels = server.getChannelRegistrar()
.getChannelsForProtocol(serverMc.getProtocolVersion());
if (!channels.isEmpty()) {
serverMc.delayedWrite(constructChannelsPacket(serverVersion, channels));
}
// If we had plugin messages queued during login/FML handshake, send them now.
PluginMessage pm;
while ((pm = loginPluginMessages.poll()) != null) {