From e135290c8a285a1e141b23ebb2bddd5b5d8ced47 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 30 Nov 2024 11:59:02 +0100 Subject: [PATCH] Fix F3 separator --- src/main/java/eu/m724/tweaks/ping/F3NameListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/m724/tweaks/ping/F3NameListener.java b/src/main/java/eu/m724/tweaks/ping/F3NameListener.java index 9b6dff1..b2d2f5b 100644 --- a/src/main/java/eu/m724/tweaks/ping/F3NameListener.java +++ b/src/main/java/eu/m724/tweaks/ping/F3NameListener.java @@ -75,15 +75,17 @@ public class F3NameListener { private String getBrandText(Player player) { String _text = text; + String sep = text.isEmpty() ? "" : " | "; + if (showMspt) { double mspt = PlayerPing.getMillisPerTick(); if (mspt > 50.05) { // mspt is at least like 50.01 because of some measuring overheads (I think) - _text += " | %.2f mspt".formatted(mspt); + _text += sep + "%.2f mspt".formatted(mspt); } } if (showPing) { - _text += " | %.2f ms".formatted(PlayerPing.getPingMillis(player)); + _text += sep + "%.2f ms".formatted(PlayerPing.getPingMillis(player)); } return _text;