From e68ed48fc3f2ae930a4c41ee908bf397e3062de8 Mon Sep 17 00:00:00 2001 From: portalBlock Date: Thu, 22 Jan 2015 01:16:12 -0600 Subject: [PATCH] Use the cached constructor when instantiating a packet. --- protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java index 9671b3a3..eaf2d3c6 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java @@ -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 );