13
0
geforkt von Mirrors/Velocity

Don't advertise the BungeeCord plugin messaging channel if it is disabled.

Dieser Commit ist enthalten in:
Andrew Steinborn 2021-02-18 18:12:38 -05:00
Ursprung 648624d333
Commit 72d47b5a3d

Datei anzeigen

@ -65,11 +65,14 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
@Override @Override
public void activated() { public void activated() {
serverConn.getServer().addPlayer(serverConn.getPlayer()); serverConn.getServer().addPlayer(serverConn.getPlayer());
if (server.getConfiguration().isBungeePluginChannelEnabled()) {
MinecraftConnection serverMc = serverConn.ensureConnected(); MinecraftConnection serverMc = serverConn.ensureConnected();
serverMc.write(PluginMessageUtil.constructChannelsPacket(serverMc.getProtocolVersion(), serverMc.write(PluginMessageUtil.constructChannelsPacket(serverMc.getProtocolVersion(),
ImmutableList.of(getBungeeCordChannel(serverMc.getProtocolVersion())) ImmutableList.of(getBungeeCordChannel(serverMc.getProtocolVersion()))
)); ));
} }
}
@Override @Override
public boolean beforeHandle() { public boolean beforeHandle() {