Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-20 06:50:08 +01:00
Rename ViaCodecException to CancelCodecException
Dieser Commit ist enthalten in:
Ursprung
7588609c56
Commit
029f399a14
@ -6,7 +6,7 @@ import io.netty.handler.codec.ByteToMessageDecoder;
|
|||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.bukkit.util.NMSUtil;
|
import us.myles.ViaVersion.bukkit.util.NMSUtil;
|
||||||
import us.myles.ViaVersion.exception.CancelDecoderException;
|
import us.myles.ViaVersion.exception.CancelDecoderException;
|
||||||
import us.myles.ViaVersion.exception.ViaCodecException;
|
import us.myles.ViaVersion.exception.CancelCodecException;
|
||||||
import us.myles.ViaVersion.util.PipelineUtil;
|
import us.myles.ViaVersion.util.PipelineUtil;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
@ -53,7 +53,7 @@ public class BukkitDecodeHandler extends ByteToMessageDecoder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
if (PipelineUtil.containsCause(cause, ViaCodecException.class)) return; // ProtocolLib compat
|
if (PipelineUtil.containsCause(cause, CancelCodecException.class)) return; // ProtocolLib compat
|
||||||
|
|
||||||
super.exceptionCaught(ctx, cause);
|
super.exceptionCaught(ctx, cause);
|
||||||
if (!NMSUtil.isDebugPropertySet()) {
|
if (!NMSUtil.isDebugPropertySet()) {
|
||||||
|
@ -6,7 +6,7 @@ import io.netty.handler.codec.MessageToByteEncoder;
|
|||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.bukkit.util.NMSUtil;
|
import us.myles.ViaVersion.bukkit.util.NMSUtil;
|
||||||
import us.myles.ViaVersion.exception.CancelEncoderException;
|
import us.myles.ViaVersion.exception.CancelEncoderException;
|
||||||
import us.myles.ViaVersion.exception.ViaCodecException;
|
import us.myles.ViaVersion.exception.CancelCodecException;
|
||||||
import us.myles.ViaVersion.handlers.ChannelHandlerContextWrapper;
|
import us.myles.ViaVersion.handlers.ChannelHandlerContextWrapper;
|
||||||
import us.myles.ViaVersion.handlers.ViaHandler;
|
import us.myles.ViaVersion.handlers.ViaHandler;
|
||||||
import us.myles.ViaVersion.util.PipelineUtil;
|
import us.myles.ViaVersion.util.PipelineUtil;
|
||||||
@ -65,7 +65,7 @@ public class BukkitEncodeHandler extends MessageToByteEncoder implements ViaHand
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
if (PipelineUtil.containsCause(cause, ViaCodecException.class)) return; // ProtocolLib compat
|
if (PipelineUtil.containsCause(cause, CancelCodecException.class)) return; // ProtocolLib compat
|
||||||
|
|
||||||
super.exceptionCaught(ctx, cause);
|
super.exceptionCaught(ctx, cause);
|
||||||
if (!NMSUtil.isDebugPropertySet()) {
|
if (!NMSUtil.isDebugPropertySet()) {
|
||||||
|
@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.exception.CancelDecoderException;
|
import us.myles.ViaVersion.exception.CancelDecoderException;
|
||||||
import us.myles.ViaVersion.exception.ViaCodecException;
|
import us.myles.ViaVersion.exception.CancelCodecException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ public class BungeeDecodeHandler extends MessageToMessageDecoder<ByteBuf> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
if (cause instanceof ViaCodecException) return;
|
if (cause instanceof CancelCodecException) return;
|
||||||
super.exceptionCaught(ctx, cause);
|
super.exceptionCaught(ctx, cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import io.netty.handler.codec.MessageToMessageEncoder;
|
|||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.bungee.util.BungeePipelineUtil;
|
import us.myles.ViaVersion.bungee.util.BungeePipelineUtil;
|
||||||
import us.myles.ViaVersion.exception.CancelEncoderException;
|
import us.myles.ViaVersion.exception.CancelEncoderException;
|
||||||
import us.myles.ViaVersion.exception.ViaCodecException;
|
import us.myles.ViaVersion.exception.CancelCodecException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ public class BungeeEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
if (cause instanceof ViaCodecException) return;
|
if (cause instanceof CancelCodecException) return;
|
||||||
super.exceptionCaught(ctx, cause);
|
super.exceptionCaught(ctx, cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,5 +6,5 @@ package us.myles.ViaVersion.exception;
|
|||||||
* @see CancelEncoderException
|
* @see CancelEncoderException
|
||||||
* @see CancelDecoderException
|
* @see CancelDecoderException
|
||||||
*/
|
*/
|
||||||
public interface ViaCodecException {
|
public interface CancelCodecException {
|
||||||
}
|
}
|
@ -7,7 +7,7 @@ import us.myles.ViaVersion.api.Via;
|
|||||||
* Thrown during packet decoding when an incoming packet should be cancelled.
|
* Thrown during packet decoding when an incoming packet should be cancelled.
|
||||||
* Specifically extends {@link DecoderException} to prevent netty from wrapping the exception.
|
* Specifically extends {@link DecoderException} to prevent netty from wrapping the exception.
|
||||||
*/
|
*/
|
||||||
public class CancelDecoderException extends DecoderException implements ViaCodecException {
|
public class CancelDecoderException extends DecoderException implements CancelCodecException {
|
||||||
public static final CancelDecoderException CACHED = new CancelDecoderException("This packet is supposed to be cancelled; If you have debug enabled, you can ignore these") {
|
public static final CancelDecoderException CACHED = new CancelDecoderException("This packet is supposed to be cancelled; If you have debug enabled, you can ignore these") {
|
||||||
@Override
|
@Override
|
||||||
public Throwable fillInStackTrace() {
|
public Throwable fillInStackTrace() {
|
||||||
|
@ -7,7 +7,7 @@ import us.myles.ViaVersion.api.Via;
|
|||||||
* Thrown during packet encoding when an outgoing packet should be cancelled.
|
* Thrown during packet encoding when an outgoing packet should be cancelled.
|
||||||
* Specifically extends {@link EncoderException} to prevent netty from wrapping the exception.
|
* Specifically extends {@link EncoderException} to prevent netty from wrapping the exception.
|
||||||
*/
|
*/
|
||||||
public class CancelEncoderException extends EncoderException implements ViaCodecException {
|
public class CancelEncoderException extends EncoderException implements CancelCodecException {
|
||||||
public static final CancelEncoderException CACHED = new CancelEncoderException("This packet is supposed to be cancelled; If you have debug enabled, you can ignore these") {
|
public static final CancelEncoderException CACHED = new CancelEncoderException("This packet is supposed to be cancelled; If you have debug enabled, you can ignore these") {
|
||||||
@Override
|
@Override
|
||||||
public Throwable fillInStackTrace() {
|
public Throwable fillInStackTrace() {
|
||||||
|
@ -5,7 +5,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.handler.codec.ByteToMessageDecoder;
|
import io.netty.handler.codec.ByteToMessageDecoder;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.exception.CancelDecoderException;
|
import us.myles.ViaVersion.exception.CancelDecoderException;
|
||||||
import us.myles.ViaVersion.exception.ViaCodecException;
|
import us.myles.ViaVersion.exception.CancelCodecException;
|
||||||
import us.myles.ViaVersion.util.PipelineUtil;
|
import us.myles.ViaVersion.util.PipelineUtil;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
@ -53,7 +53,7 @@ public class SpongeDecodeHandler extends ByteToMessageDecoder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
if (cause instanceof ViaCodecException) return;
|
if (cause instanceof CancelCodecException) return;
|
||||||
super.exceptionCaught(ctx, cause);
|
super.exceptionCaught(ctx, cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.handler.codec.MessageToByteEncoder;
|
import io.netty.handler.codec.MessageToByteEncoder;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.exception.CancelEncoderException;
|
import us.myles.ViaVersion.exception.CancelEncoderException;
|
||||||
import us.myles.ViaVersion.exception.ViaCodecException;
|
import us.myles.ViaVersion.exception.CancelCodecException;
|
||||||
import us.myles.ViaVersion.handlers.ChannelHandlerContextWrapper;
|
import us.myles.ViaVersion.handlers.ChannelHandlerContextWrapper;
|
||||||
import us.myles.ViaVersion.handlers.ViaHandler;
|
import us.myles.ViaVersion.handlers.ViaHandler;
|
||||||
import us.myles.ViaVersion.util.PipelineUtil;
|
import us.myles.ViaVersion.util.PipelineUtil;
|
||||||
@ -49,7 +49,7 @@ public class SpongeEncodeHandler extends MessageToByteEncoder<Object> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
if (cause instanceof ViaCodecException) return;
|
if (cause instanceof CancelCodecException) return;
|
||||||
super.exceptionCaught(ctx, cause);
|
super.exceptionCaught(ctx, cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.exception.CancelDecoderException;
|
import us.myles.ViaVersion.exception.CancelDecoderException;
|
||||||
import us.myles.ViaVersion.exception.ViaCodecException;
|
import us.myles.ViaVersion.exception.CancelCodecException;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ public class VelocityDecodeHandler extends MessageToMessageDecoder<ByteBuf> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
if (cause instanceof ViaCodecException) return;
|
if (cause instanceof CancelCodecException) return;
|
||||||
super.exceptionCaught(ctx, cause);
|
super.exceptionCaught(ctx, cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import io.netty.handler.codec.MessageToMessageDecoder;
|
|||||||
import io.netty.handler.codec.MessageToMessageEncoder;
|
import io.netty.handler.codec.MessageToMessageEncoder;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.exception.CancelEncoderException;
|
import us.myles.ViaVersion.exception.CancelEncoderException;
|
||||||
import us.myles.ViaVersion.exception.ViaCodecException;
|
import us.myles.ViaVersion.exception.CancelCodecException;
|
||||||
import us.myles.ViaVersion.util.PipelineUtil;
|
import us.myles.ViaVersion.util.PipelineUtil;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
@ -81,7 +81,7 @@ public class VelocityEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
if (cause instanceof ViaCodecException) return;
|
if (cause instanceof CancelCodecException) return;
|
||||||
super.exceptionCaught(ctx, cause);
|
super.exceptionCaught(ctx, cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren