Display whether or not a packet has been cloned in the packet command.

This commit is contained in:
Kristian S. Stangeland 2013-08-07 00:33:57 +02:00
parent b27922dd3d
commit ba692d5b7d

View File

@ -413,10 +413,12 @@ class CommandPacket extends CommandBase {
} }
private void printInformation(PacketEvent event) { private void printInformation(PacketEvent event) {
String verb = side.isForClient() ? "Received" : "Sent";
String format = side.isForClient() ? String format = side.isForClient() ?
"Received %s (%s) from %s" : "%s %s (%s) from %s" :
"Sent %s (%s) to %s"; "%s %s (%s) to %s";
String shortDescription = String.format(format, String shortDescription = String.format(format,
event.isCancelled() ? "Cancelled" : verb,
Packets.getDeclaredName(event.getPacketID()), Packets.getDeclaredName(event.getPacketID()),
event.getPacketID(), event.getPacketID(),
event.getPlayer().getName() event.getPlayer().getName()