From ba692d5b7d17637b59342ce70c5af30a63ea328d Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Wed, 7 Aug 2013 00:33:57 +0200 Subject: [PATCH] Display whether or not a packet has been cloned in the packet command. --- .../src/main/java/com/comphenix/protocol/CommandPacket.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandPacket.java b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandPacket.java index 337f3b3d..5d866c5d 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandPacket.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandPacket.java @@ -413,10 +413,12 @@ class CommandPacket extends CommandBase { } private void printInformation(PacketEvent event) { + String verb = side.isForClient() ? "Received" : "Sent"; String format = side.isForClient() ? - "Received %s (%s) from %s" : - "Sent %s (%s) to %s"; + "%s %s (%s) from %s" : + "%s %s (%s) to %s"; String shortDescription = String.format(format, + event.isCancelled() ? "Cancelled" : verb, Packets.getDeclaredName(event.getPacketID()), event.getPacketID(), event.getPlayer().getName()