mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-10-04 11:08:38 -04:00
Update /ping all format
Makes it a bit more human readable.
This commit is contained in:
parent
816d52b6ad
commit
1c363c77fb
@ -39,12 +39,12 @@ namespace MCGalaxy.Commands.Chatting {
|
|||||||
} else {
|
} else {
|
||||||
if (!CheckExtraPerm(p, data, 1)) return;
|
if (!CheckExtraPerm(p, data, 1)) return;
|
||||||
Player[] players = PlayerInfo.Online.Items;
|
Player[] players = PlayerInfo.Online.Items;
|
||||||
p.Message("Ping/latency list for online players:");
|
p.Message("Ping/latency list for online players: (&ALo%S:&7Avg%S:&CHi%S)ms");
|
||||||
|
|
||||||
foreach (Player pl in players) {
|
foreach (Player pl in players) {
|
||||||
if (!Entities.CanSee(data, p, pl)) continue;
|
if (!Entities.CanSee(data, p, pl)) continue;
|
||||||
if (pl.Ping.Measures() == 0) continue;
|
if (pl.Ping.Measures() == 0) continue;
|
||||||
p.Message(pl.ColoredName + " %S- " + pl.Ping.Format());
|
p.Message(pl.Ping.FormatAll() + " %S- " + pl.ColoredName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,5 +107,10 @@ namespace MCGalaxy.Network {
|
|||||||
return string.Format("Lowest ping {0}ms, average {1}ms, highest {2}ms",
|
return string.Format("Lowest ping {0}ms, average {1}ms, highest {2}ms",
|
||||||
LowestPing(), AveragePing(), HighestPing());
|
LowestPing(), AveragePing(), HighestPing());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string FormatAll() {
|
||||||
|
return string.Format(" &A{0}%S:&7{1}%S:&C{2}",
|
||||||
|
LowestPing(), AveragePing(), HighestPing());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user