Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Fix: Geyser on Velocity after they renamed packet class names :/ (#4399)
Dieser Commit ist enthalten in:
Ursprung
710dbfc1c8
Commit
509e00c138
@ -47,8 +47,14 @@ public class GeyserVelocityCompressionDisabler extends ChannelDuplexHandler {
|
|||||||
Method setCompressionMethod = null;
|
Method setCompressionMethod = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
compressionPacketClass = Class.forName("com.velocitypowered.proxy.protocol.packet.SetCompression");
|
try {
|
||||||
loginSuccessPacketClass = Class.forName("com.velocitypowered.proxy.protocol.packet.ServerLoginSuccess");
|
compressionPacketClass = Class.forName("com.velocitypowered.proxy.protocol.packet.SetCompressionPacket");
|
||||||
|
loginSuccessPacketClass = Class.forName("com.velocitypowered.proxy.protocol.packet.ServerLoginSuccessPacket");
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
// Velocity renamed packet classes in https://github.com/PaperMC/Velocity/commit/2ac8751337befd04f4663575f5d752c748384110
|
||||||
|
compressionPacketClass = Class.forName("com.velocitypowered.proxy.protocol.packet.SetCompression");
|
||||||
|
loginSuccessPacketClass = Class.forName("com.velocitypowered.proxy.protocol.packet.ServerLoginSuccess");
|
||||||
|
}
|
||||||
compressionEnabledEvent = Class.forName("com.velocitypowered.proxy.protocol.VelocityConnectionEvent")
|
compressionEnabledEvent = Class.forName("com.velocitypowered.proxy.protocol.VelocityConnectionEvent")
|
||||||
.getDeclaredField("COMPRESSION_ENABLED").get(null);
|
.getDeclaredField("COMPRESSION_ENABLED").get(null);
|
||||||
setCompressionMethod = Class.forName("com.velocitypowered.proxy.connection.MinecraftConnection")
|
setCompressionMethod = Class.forName("com.velocitypowered.proxy.connection.MinecraftConnection")
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren