From 19903e954802af2a8015833d525fbdd16da49368 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 28 Nov 2023 19:00:18 +0100 Subject: [PATCH] Fix playtime command Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/commands/PlaytimeCommand.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java b/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java index c483ec9..bbe0dda 100644 --- a/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java +++ b/src/de/steamwar/bungeecore/commands/PlaytimeCommand.java @@ -34,9 +34,10 @@ public class PlaytimeCommand extends SWCommand { @Register 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); - 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); }