Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Allow the BungeeCord plugin messaging channel to be used by the server at transition time
Dieser Commit ist enthalten in:
Ursprung
4ca1798994
Commit
d1135bd190
@ -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)) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren