SteamWar/BungeeCore
Archiviert
13
2

Fix playtime command
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2023-11-28 19:00:18 +01:00
Ursprung 04a2a31d80
Commit 19903e9548

Datei anzeigen

@ -34,9 +34,10 @@ public class PlaytimeCommand extends SWCommand {
@Register @Register
public void genericCommand(ProxiedPlayer player) { public void genericCommand(ProxiedPlayer player) {
NumberFormat format = NumberFormat.getNumberInstance((player).getLocale()); SteamwarUser user = SteamwarUser.get(player.getUniqueId());
NumberFormat format = NumberFormat.getNumberInstance(user.getLocale());
format.setMaximumFractionDigits(2); format.setMaximumFractionDigits(2);
String formattedText = format.format((SteamwarUser.get(player.getUniqueId()).getOnlinetime() / (double) 3600)); String formattedText = format.format((user.getOnlinetime() / (double) 3600));
Message.send("HOURS_PLAYED", player, formattedText); Message.send("HOURS_PLAYED", player, formattedText);
} }