Use the cached constructor when instantiating a packet.
This commit is contained in:
parent
cf722de1d2
commit
e68ed48fc3
@ -138,7 +138,7 @@ public enum Protocol
|
||||
|
||||
try
|
||||
{
|
||||
return packetClasses[id].newInstance();
|
||||
return packetConstructors[id].newInstance();
|
||||
} catch ( ReflectiveOperationException ex )
|
||||
{
|
||||
throw new BadPacketException( "Could not construct packet with id " + id, ex );
|
||||
|
Loading…
Reference in New Issue
Block a user