diff --git a/common/src/main/java/us/myles/ViaVersion/api/protocol/Protocol.java b/common/src/main/java/us/myles/ViaVersion/api/protocol/Protocol.java index 430e0c4f3..fd9c853a3 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/protocol/Protocol.java +++ b/common/src/main/java/us/myles/ViaVersion/api/protocol/Protocol.java @@ -171,6 +171,15 @@ public abstract class Protocol { }); } + public void cancelOutgoing(State state, int oldPacketID) { + registerIncoming(state, oldPacketID, -1, new PacketRemapper() { + @Override + public void registerMap() { + handler(PacketWrapper::cancel); + } + }); + } + /** * Transform a packet using this protocol *