From 73321e4b7e46bcb38c57875bab63196d75913795 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Wed, 29 Dec 2021 10:11:39 +0100 Subject: [PATCH] Format --- src/de/steamwar/bungeecore/commands/PlaytimeCommand.java | 5 ++--- src/de/steamwar/messages/BungeeCore.properties | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java b/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java index e570db1b..5b39ca83 100644 --- a/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java +++ b/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java @@ -40,9 +40,8 @@ public class PlaytimeCommand extends BasicCommand{ if(!(sender instanceof ProxiedPlayer)) return; - NumberFormat format = NumberFormat.getNumberInstance(Locale.GERMAN); - format.setMaximumFractionDigits(2); - format.format((SteamwarUser.get((ProxiedPlayer) sender).getOnlinetime() / (double) 3600)); + String s = Message.parse("TIME_FORMAT", sender); + String format = new DecimalFormat(s).format((SteamwarUser.get((ProxiedPlayer) sender).getOnlinetime() / (double) 3600)); Message.send("HOURS_PLAYED", sender, format); } diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index fbfb85f9..48b8f970 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -560,4 +560,7 @@ GDPR_STATUS_LOGS=§7Suche und packe logs... GDPR_STATUS_FINISHED=§7Packen abgeschlossen #Playtime Command -HOURS_PLAYED=§7Deine Spielzeit beträgt§8: §e{0}h \ No newline at end of file +HOURS_PLAYED=§7Deine Spielzeit beträgt§8: §e{0}h + +#Player +TIME_FORMAT=hh:mm:ss \ No newline at end of file