Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 00:22:51 +01:00
Merge branch 'master' into dev
Dieser Commit ist enthalten in:
Commit
d1a0d629df
@ -31,17 +31,25 @@ public class BukkitDecodeHandler extends ByteToMessageDecoder {
|
|||||||
throw CancelDecoderException.generate(null);
|
throw CancelDecoderException.generate(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.shouldTransformPacket()) {
|
ByteBuf transformedBuf = null;
|
||||||
info.transformIncoming(bytebuf, CancelDecoderException::generate);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
list.addAll(PipelineUtil.callDecode(this.minecraftDecoder, ctx, bytebuf));
|
if (info.shouldTransformPacket()) {
|
||||||
} catch (InvocationTargetException e) {
|
transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf);
|
||||||
if (e.getCause() instanceof Exception) {
|
info.transformIncoming(transformedBuf, CancelDecoderException::generate);
|
||||||
throw (Exception) e.getCause();
|
}
|
||||||
} else if (e.getCause() instanceof Error) {
|
|
||||||
throw (Error) e.getCause();
|
try {
|
||||||
|
list.addAll(PipelineUtil.callDecode(this.minecraftDecoder, ctx, transformedBuf == null ? bytebuf : transformedBuf));
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
if (e.getCause() instanceof Exception) {
|
||||||
|
throw (Exception) e.getCause();
|
||||||
|
} else if (e.getCause() instanceof Error) {
|
||||||
|
throw (Error) e.getCause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (transformedBuf != null) {
|
||||||
|
transformedBuf.release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,17 +28,25 @@ public class SpongeDecodeHandler extends ByteToMessageDecoder {
|
|||||||
throw CancelDecoderException.generate(null);
|
throw CancelDecoderException.generate(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.shouldTransformPacket()) {
|
ByteBuf transformedBuf = null;
|
||||||
info.transformIncoming(bytebuf, CancelDecoderException::generate);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
list.addAll(PipelineUtil.callDecode(this.minecraftDecoder, ctx, bytebuf));
|
if (info.shouldTransformPacket()) {
|
||||||
} catch (InvocationTargetException e) {
|
transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf);
|
||||||
if (e.getCause() instanceof Exception) {
|
info.transformIncoming(transformedBuf, CancelDecoderException::generate);
|
||||||
throw (Exception) e.getCause();
|
}
|
||||||
} else if (e.getCause() instanceof Error) {
|
|
||||||
throw (Error) e.getCause();
|
try {
|
||||||
|
list.addAll(PipelineUtil.callDecode(this.minecraftDecoder, ctx, transformedBuf == null ? bytebuf : transformedBuf));
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
if (e.getCause() instanceof Exception) {
|
||||||
|
throw (Exception) e.getCause();
|
||||||
|
} else if (e.getCause() instanceof Error) {
|
||||||
|
throw (Error) e.getCause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (transformedBuf != null) {
|
||||||
|
transformedBuf.release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren