13
0
geforkt von Mirrors/Velocity

Allow the BungeeCord plugin messaging channel to be used by the server at transition time

Dieser Commit ist enthalten in:
Andrew Steinborn 2021-09-07 07:38:30 -04:00
Ursprung 4ca1798994
Commit d1135bd190

Datei anzeigen

@ -51,6 +51,7 @@ public class TransitionSessionHandler implements MinecraftSessionHandler {
private final VelocityServer server;
private final VelocityServerConnection serverConn;
private final CompletableFuture<Impl> resultFuture;
private final BungeeCordMessageResponder bungeecordMessageResponder;
/**
* Creates the new transition handler.
@ -64,6 +65,8 @@ public class TransitionSessionHandler implements MinecraftSessionHandler {
this.server = server;
this.serverConn = serverConn;
this.resultFuture = resultFuture;
this.bungeecordMessageResponder = new BungeeCordMessageResponder(server,
serverConn.getPlayer());
}
@Override
@ -168,6 +171,10 @@ public class TransitionSessionHandler implements MinecraftSessionHandler {
@Override
public boolean handle(PluginMessage packet) {
if (bungeecordMessageResponder.process(packet)) {
return true;
}
if (PluginMessageUtil.isRegister(packet)) {
serverConn.getPlayer().getKnownChannels().addAll(PluginMessageUtil.getChannels(packet));
} else if (PluginMessageUtil.isUnregister(packet)) {