diff --git a/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java b/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java index 468fae8d..e570db1b 100644 --- a/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java +++ b/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java @@ -25,6 +25,9 @@ import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.connection.ProxiedPlayer; import java.text.DecimalFormat; +import java.text.Format; +import java.text.NumberFormat; +import java.util.Locale; public class PlaytimeCommand extends BasicCommand{ @@ -37,6 +40,10 @@ public class PlaytimeCommand extends BasicCommand{ if(!(sender instanceof ProxiedPlayer)) return; - Message.send("HOURS_PLAYED", sender, new DecimalFormat("###.##").format((SteamwarUser.get((ProxiedPlayer) sender).getOnlinetime() / (double) 3600))); + NumberFormat format = NumberFormat.getNumberInstance(Locale.GERMAN); + format.setMaximumFractionDigits(2); + format.format((SteamwarUser.get((ProxiedPlayer) sender).getOnlinetime() / (double) 3600)); + + Message.send("HOURS_PLAYED", sender, format); } }