@@ -527,18 +527,13 @@ private void createJoinNotifications(PlayerListS2CPacket packet) {
527527 }
528528
529529 if (simpleNotifications .get ()) {
530- messageQueue .addLast (Text .literal (
531- Formatting .GRAY + "["
532- + Formatting .GREEN + "+"
533- + Formatting .GRAY + "] "
534- + name
535- ));
530+ messageQueue .addLast (Text .literal ("[" ).formatted (Formatting .GRAY )
531+ .append (Text .literal ("+" ).formatted (Formatting .GREEN ))
532+ .append (Text .literal ("] " ).formatted (Formatting .GRAY ))
533+ .append (Text .literal (name ).formatted (Formatting .WHITE )));
536534 } else {
537- messageQueue .addLast (Text .literal (
538- Formatting .WHITE
539- + name
540- + Formatting .GRAY + " joined."
541- ));
535+ messageQueue .addLast (Text .literal (name ).formatted (Formatting .WHITE )
536+ .append (Text .literal (" joined." ).formatted (Formatting .GRAY )));
542537 }
543538 }
544539 }
@@ -559,18 +554,13 @@ private void createLeaveNotification(PlayerRemoveS2CPacket packet) {
559554 }
560555
561556 if (simpleNotifications .get ()) {
562- messageQueue .addLast (Text .literal (
563- Formatting .GRAY + "["
564- + Formatting .RED + "-"
565- + Formatting .GRAY + "] "
566- + name
567- ));
557+ messageQueue .addLast (Text .literal ("[" ).formatted (Formatting .GRAY )
558+ .append (Text .literal ("-" ).formatted (Formatting .RED ))
559+ .append (Text .literal ("] " ).formatted (Formatting .GRAY ))
560+ .append (Text .literal (name ).formatted (Formatting .WHITE )));
568561 } else {
569- messageQueue .addLast (Text .literal (
570- Formatting .WHITE
571- + name
572- + Formatting .GRAY + " left."
573- ));
562+ messageQueue .addLast (Text .literal (name ).formatted (Formatting .WHITE )
563+ .append (Text .literal (" left." ).formatted (Formatting .GRAY )));
574564 }
575565 }
576566 }
0 commit comments