SteamWar/BungeeCore
Archiviert
13
2

Format
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
zOnlyKroks 2021-12-29 09:29:55 +01:00
Ursprung 6b0fb7ca6f
Commit 803b591ff4

Datei anzeigen

@ -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);
}
}