Skip to content

Commit 6cc8a79

Browse files
committed
fixes
1 parent cc2eca5 commit 6cc8a79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/me/ayunami2000/ayunViaProxyEagUtils/EaglercraftHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,12 @@ protected void decode(final ChannelHandlerContext ctx, final WebSocketFrame in,
284284
ctx.channel().writeAndFlush(new BinaryWebSocketFrame(data.readerIndex(0).retain()));
285285
break;
286286
}
287-
if (!ctx.channel().hasAttr(Main.secureWs)) {
287+
if (!ctx.channel().hasAttr(Main.secureWs) || ctx.channel().attr(Main.secureWs) == null) {
288288
if (packetId == ServerboundPackets1_5_2.PLUGIN_MESSAGE.getId() && Types1_6_4.STRING.read(data).startsWith("EAG|")) {
289289
break;
290290
}
291291
}
292-
} else if (this.version.isNewerThanOrEqualTo(VersionEnum.r1_7_2tor1_7_5) && !ctx.channel().hasAttr(Main.secureWs)) {
292+
} else if (this.version.isNewerThanOrEqualTo(VersionEnum.r1_7_2tor1_7_5) && (!ctx.channel().hasAttr(Main.secureWs) || ctx.channel().attr(Main.secureWs) == null)) {
293293
final int packetId = PacketTypes.readVarInt(data);
294294
if (packetId == this.pluginMessageId && PacketTypes.readString(data, 32767).startsWith("EAG|")) {
295295
break;

0 commit comments

Comments
 (0)