Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
End bundle session on server switch (#1385)
Dieser Commit ist enthalten in:
Ursprung
d999ee2058
Commit
a4476253ab
@ -69,6 +69,7 @@ import com.velocitypowered.proxy.connection.util.ConnectionRequestResults.Impl;
|
||||
import com.velocitypowered.proxy.connection.util.VelocityInboundConnection;
|
||||
import com.velocitypowered.proxy.protocol.StateRegistry;
|
||||
import com.velocitypowered.proxy.protocol.netty.MinecraftEncoder;
|
||||
import com.velocitypowered.proxy.protocol.packet.BundleDelimiterPacket;
|
||||
import com.velocitypowered.proxy.protocol.packet.ClientSettingsPacket;
|
||||
import com.velocitypowered.proxy.protocol.packet.ClientboundCookieRequestPacket;
|
||||
import com.velocitypowered.proxy.protocol.packet.ClientboundStoreCookiePacket;
|
||||
@ -1276,6 +1277,10 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player,
|
||||
public void switchToConfigState() {
|
||||
server.getEventManager().fire(new PlayerEnterConfigurationEvent(this, getConnectionInFlightOrConnectedServer()))
|
||||
.completeOnTimeout(null, 5, TimeUnit.SECONDS).thenRunAsync(() -> {
|
||||
if (bundleHandler.isInBundleSession()) {
|
||||
bundleHandler.toggleBundleSession();
|
||||
connection.write(BundleDelimiterPacket.INSTANCE);
|
||||
}
|
||||
connection.write(StartUpdatePacket.INSTANCE);
|
||||
connection.getChannel().pipeline().get(MinecraftEncoder.class).setState(StateRegistry.CONFIG);
|
||||
// Make sure we don't send any play packets to the player after update start
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren