Correct format for hour

This commit is contained in:
Clément
2025-02-28 15:02:03 +01:00
parent f0a9617649
commit 09637ba775
2 changed files with 6 additions and 2 deletions

View File

@@ -50,12 +50,14 @@ public class ClientConnexion implements PacketVisitor, PacketHandler{
public void visitPacket(ChatMessagePacket packet) {
StringBuilder sb = new StringBuilder();
String time = packet.getTime().toString();
sb.append("&y[");
sb.append(time, 11, 19); // We only take the HH:MM:SS part
sb.append("]&n");
sb.append(" ");
sb.append(packet.getChatter());
sb.append(" : ");
sb.append(ANSIColor.formatString(packet.getContent() + "&n")); // make the color back to normal at the end of every message
System.out.println(sb);
sb.append(packet.getContent()).append("&n"); // make the color back to normal at the end of every message
System.out.println(ANSIColor.formatString(sb.toString()));
}
@Override