Archiviert
13
0

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

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-08-07 00:33:57 +02:00
Ursprung b27922dd3d
Commit ba692d5b7d

Datei anzeigen

@ -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()