Fix F3 separator
Some checks failed
/ deploy (push) Has been cancelled

This commit is contained in:
Minecon724 2024-11-30 11:59:02 +01:00
parent 3d4eff8ff0
commit e135290c8a
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8

View file

@ -75,15 +75,17 @@ public class F3NameListener {
private String getBrandText(Player player) { private String getBrandText(Player player) {
String _text = text; String _text = text;
String sep = text.isEmpty() ? "" : " | ";
if (showMspt) { if (showMspt) {
double mspt = PlayerPing.getMillisPerTick(); double mspt = PlayerPing.getMillisPerTick();
if (mspt > 50.05) { // mspt is at least like 50.01 because of some measuring overheads (I think) 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) { if (showPing) {
_text += " | %.2f ms".formatted(PlayerPing.getPingMillis(player)); _text += sep + "%.2f ms".formatted(PlayerPing.getPingMillis(player));
} }
return _text; return _text;