Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 14:30:17 +01:00
Fix injectors, should work with Spigot/Paper 1.20.5 now
Dieser Commit ist enthalten in:
Ursprung
9217414c8c
Commit
9b1e45007a
@ -93,8 +93,11 @@ public class GeyserModInjector extends GeyserInjector {
|
||||
protected void initChannel(@NonNull Channel ch) throws Exception {
|
||||
initChannel.invoke(childHandler, ch);
|
||||
|
||||
int index = ch.pipeline().names().indexOf("encoder");
|
||||
String baseName = index != -1 ? "encoder" : "outbound_config";
|
||||
|
||||
if (bootstrap.getGeyserConfig().isDisableCompression()) {
|
||||
ch.pipeline().addAfter("encoder", "geyser-compression-disabler", new GeyserModCompressionDisabler());
|
||||
ch.pipeline().addAfter(baseName, "geyser-compression-disabler", new GeyserModCompressionDisabler());
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -119,8 +119,11 @@ public class GeyserSpigotInjector extends GeyserInjector {
|
||||
protected void initChannel(@NonNull Channel ch) throws Exception {
|
||||
initChannel.invoke(childHandler, ch);
|
||||
|
||||
int index = ch.pipeline().names().indexOf("encoder");
|
||||
String baseName = index != -1 ? "encoder" : "outbound_config";
|
||||
|
||||
if (bootstrap.getGeyserConfig().isDisableCompression() && GeyserSpigotCompressionDisabler.ENABLED) {
|
||||
ch.pipeline().addAfter("encoder", "geyser-compression-disabler", new GeyserSpigotCompressionDisabler());
|
||||
ch.pipeline().addAfter(baseName, "geyser-compression-disabler", new GeyserSpigotCompressionDisabler());
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -33,6 +33,7 @@ import org.geysermc.mcprotocollib.protocol.packet.common.clientbound.Serverbound
|
||||
|
||||
@Translator(packet = ClientboundCookieRequestPacket.class)
|
||||
public class JavaCookieRequestTranslator extends PacketTranslator<ClientboundCookieRequestPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundCookieRequestPacket packet) {
|
||||
ServerboundCookieResponsePacket responsePacket = new ServerboundCookieResponsePacket(
|
||||
|
@ -32,6 +32,7 @@ import org.geysermc.mcprotocollib.protocol.packet.common.clientbound.Clientbound
|
||||
|
||||
@Translator(packet = ClientboundStoreCookiePacket.class)
|
||||
public class JavaStoreCookieTranslator extends PacketTranslator<ClientboundStoreCookiePacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundStoreCookiePacket packet) {
|
||||
session.getCookies().put(packet.getKey(), packet.getPayload());
|
||||
|
@ -35,6 +35,7 @@ import org.geysermc.mcprotocollib.protocol.packet.common.clientbound.Clientbound
|
||||
|
||||
@Translator(packet = ClientboundTransferPacket.class)
|
||||
public class JavaTransferPacketTranslator extends PacketTranslator<ClientboundTransferPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundTransferPacket packet) {
|
||||
ServerTransferEvent event = new ServerTransferEvent(
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren