From 2985dc9cf8893582257a418c6c70649c4b58f113 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Thu, 28 Feb 2013 22:30:37 +0100 Subject: [PATCH] Be less picky over what packets to subclass. FIXES Ticket-49 --- .../protocol/injector/packet/ProxyPacketInjector.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/ProxyPacketInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/ProxyPacketInjector.java index 2c3e6a1b..f4224bba 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/ProxyPacketInjector.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/packet/ProxyPacketInjector.java @@ -29,6 +29,7 @@ import org.bukkit.entity.Player; import net.sf.cglib.proxy.Callback; import net.sf.cglib.proxy.Enhancer; +import net.sf.cglib.proxy.Factory; import com.comphenix.protocol.Packets; import com.comphenix.protocol.error.ErrorReporter; @@ -132,7 +133,7 @@ class ProxyPacketInjector implements PacketInjector { throw new IllegalStateException("Packet ID " + packetID + " is not a valid packet ID in this version."); } // Check for previous injections - if (!MinecraftReflection.isMinecraftClass(old)) { + if (Factory.class.isAssignableFrom(old)) { throw new IllegalStateException("Packet " + packetID + " has already been injected."); }