Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/src/main/java/net/elytrium/limboapi/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static class MAIN {
"WARNING: do not change when proxy is running, it will break exsiting connections",
"LimboAPI will be running in compatibility mode, allowing other plugins to",
"intercept or modify packets sent by it, but will reduce performance in some cases.",
"Enable if you are using plugins that modify packets. (e.g. ViaVersion, Raknetify or PacketEvents)",
"Enable if you are using plugins that modify packets. (e.g. ViaVersion, Raknetify, EaglerX or PacketEvents)",
"Require 'save-uncompressed-packets: true' to work properly"
})
public boolean COMPATIBILITY_MODE = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ public void hookLoginSession(GameProfileRequestEvent event) throws Throwable {
// Complete the Login process.
int threshold = this.server.getConfiguration().getCompressionThreshold();
ChannelPipeline pipeline = connection.getChannel().pipeline();
boolean compressionEnabled = threshold >= 0 && connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_8) >= 0;
boolean compressionEnabled = threshold >= 0 && connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_8) >= 0
&& pipeline.context(Connections.FRAME_ENCODER) != null;
if (compressionEnabled) {
connection.write(new SetCompressionPacket(threshold));
this.plugin.fixDecompressor(pipeline, threshold, true);
Expand Down
Loading