geforkt von Mirrors/Velocity
Actually send plugin message registration to backend servers
I don't see where this was ever done, and don't see how plugin messaging could of ever worked, at least within the confines of CB and co, given the fact that we never seemed to be sending this to the backend?
Dieser Commit ist enthalten in:
Ursprung
768ecdb0c3
Commit
550ca58a09
@ -18,6 +18,7 @@
|
||||
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;
|
||||
@ -61,6 +62,8 @@ 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;
|
||||
@ -105,12 +108,20 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
||||
public void activated() {
|
||||
serverConn.getServer().addPlayer(serverConn.getPlayer());
|
||||
|
||||
MinecraftConnection serverMc = serverConn.ensureConnected();
|
||||
if (server.getConfiguration().isBungeePluginChannelEnabled()) {
|
||||
MinecraftConnection serverMc = serverConn.ensureConnected();
|
||||
serverMc.write(PluginMessageUtil.constructChannelsPacket(serverMc.getProtocolVersion(),
|
||||
ImmutableList.of(getBungeeCordChannel(serverMc.getProtocolVersion()))
|
||||
));
|
||||
}
|
||||
|
||||
Collection<String> channels =
|
||||
server.getChannelRegistrar().getChannelsForProtocol(serverConn.getPlayer().getProtocolVersion());
|
||||
if (!channels.isEmpty()) {
|
||||
PluginMessage register = constructChannelsPacket(serverConn.getPlayer().getProtocolVersion(), channels);
|
||||
serverMc.write(register);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren