Skip to content

Commit

Permalink
Be less picky over what packets to subclass. FIXES Ticket-49
Browse files Browse the repository at this point in the history
  • Loading branch information
aadnk committed Feb 28, 2013
1 parent 8388a77 commit 2985dc9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

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;
Expand Down Expand Up @@ -132,7 +133,7 @@ public boolean addPacketHandler(int packetID) {
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.");
}

Expand Down

0 comments on commit 2985dc9

Please sign in to comment.