From 1fc72e10cc144968b4002f9101985570aeadc0b2 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 24 Nov 2013 06:31:41 +1300 Subject: [PATCH] Fixed a array size exception --- src/me/libraryaddict/disguise/utilities/PacketsManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/utilities/PacketsManager.java b/src/me/libraryaddict/disguise/utilities/PacketsManager.java index 01ced524..27d8033b 100644 --- a/src/me/libraryaddict/disguise/utilities/PacketsManager.java +++ b/src/me/libraryaddict/disguise/utilities/PacketsManager.java @@ -628,7 +628,7 @@ public class PacketsManager { if (fakeId > 0) { // Here I grab the packets to convert them to, So I can display them as if the disguise sent them. PacketContainer[] packets = transformPacket(event.getPacket(), event.getPlayer()); - final PacketContainer[] delayedPackets = new PacketContainer[packets.length - 1]; + final PacketContainer[] delayedPackets = new PacketContainer[packets.length > 0 ? packets.length - 1 : 0]; final Player observer = event.getPlayer(); for (int i = 0; i < packets.length; i++) { PacketContainer packet = packets[i];