geforkt von SteamWar/BungeeCore
Format
Dieser Commit ist enthalten in:
Ursprung
6b0fb7ca6f
Commit
803b591ff4
@ -25,6 +25,9 @@ import net.md_5.bungee.api.CommandSender;
|
|||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
import java.text.Format;
|
||||||
|
import java.text.NumberFormat;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class PlaytimeCommand extends BasicCommand{
|
public class PlaytimeCommand extends BasicCommand{
|
||||||
|
|
||||||
@ -37,6 +40,10 @@ public class PlaytimeCommand extends BasicCommand{
|
|||||||
if(!(sender instanceof ProxiedPlayer))
|
if(!(sender instanceof ProxiedPlayer))
|
||||||
return;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren