appease checkstyle, move back to older fix placement

This commit is contained in:
Shane Freeder
2023-10-10 18:21:02 +01:00
parent 550ca58a09
commit 05e5963660
2 changed files with 8 additions and 10 deletions

View File

@@ -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

View File

@@ -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) {