Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-09-08 22:02:50 +02:00
Fix weird closedchannel bug
Dieser Commit ist enthalten in:
Ursprung
5582556d8a
Commit
f462ff9e8a
@ -8,6 +8,8 @@ import io.netty.buffer.ByteBufOutputStream;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.codec.ByteToMessageDecoder;
|
import io.netty.handler.codec.ByteToMessageDecoder;
|
||||||
import io.netty.handler.codec.MessageToByteEncoder;
|
import io.netty.handler.codec.MessageToByteEncoder;
|
||||||
|
import org.spacehq.opennbt.NBTIO;
|
||||||
|
import org.spacehq.opennbt.tag.builtin.CompoundTag;
|
||||||
import us.myles.ViaVersion.chunks.MagicBitSet;
|
import us.myles.ViaVersion.chunks.MagicBitSet;
|
||||||
import us.myles.ViaVersion.chunks.PacketChunk;
|
import us.myles.ViaVersion.chunks.PacketChunk;
|
||||||
import us.myles.ViaVersion.chunks.PacketChunkData;
|
import us.myles.ViaVersion.chunks.PacketChunkData;
|
||||||
@ -26,9 +28,6 @@ import java.util.BitSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.spacehq.opennbt.NBTIO;
|
|
||||||
import org.spacehq.opennbt.tag.builtin.CompoundTag;
|
|
||||||
|
|
||||||
public class PacketUtil {
|
public class PacketUtil {
|
||||||
private static Method DECODE_METHOD;
|
private static Method DECODE_METHOD;
|
||||||
private static Method ENCODE_METHOD;
|
private static Method ENCODE_METHOD;
|
||||||
@ -406,7 +405,8 @@ public class PacketUtil {
|
|||||||
public static boolean containsCause(Throwable t, Class<? extends Throwable> c) {
|
public static boolean containsCause(Throwable t, Class<? extends Throwable> c) {
|
||||||
while (t != null) {
|
while (t != null) {
|
||||||
t = t.getCause();
|
t = t.getCause();
|
||||||
if (c.isAssignableFrom(t.getClass())) return true;
|
if (t != null)
|
||||||
|
if (c.isAssignableFrom(t.getClass())) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren