Dieser Commit ist enthalten in:
Ursprung
71befae83b
Commit
d72c8e612f
@ -129,6 +129,7 @@ public class BungeeCore extends Plugin {
|
|||||||
new StatCommand();
|
new StatCommand();
|
||||||
new VerifyCommand();
|
new VerifyCommand();
|
||||||
new GDPRQuery();
|
new GDPRQuery();
|
||||||
|
new PlaytimeCommand();
|
||||||
|
|
||||||
// Punishment Commands:
|
// Punishment Commands:
|
||||||
new PunishmentCommand("ban", Punishment.PunishmentType.Ban);
|
new PunishmentCommand("ban", Punishment.PunishmentType.Ban);
|
||||||
|
21
src/de/steamwar/bungeecore/commands/PlaytimeCommand.java
Normale Datei
21
src/de/steamwar/bungeecore/commands/PlaytimeCommand.java
Normale Datei
@ -0,0 +1,21 @@
|
|||||||
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
|
import de.steamwar.bungeecore.Message;
|
||||||
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
|
public class PlaytimeCommand extends BasicCommand{
|
||||||
|
|
||||||
|
public PlaytimeCommand() {
|
||||||
|
super("playtime", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public void execute(CommandSender sender, String[] strings) {
|
||||||
|
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||||
|
SteamwarUser user = SteamwarUser.get(player);
|
||||||
|
Message.send("WHOIS_HOURS_PLAYED", player, new DecimalFormat("###.##").format(user.getOnlinetime() / (double) 3600));
|
||||||
|
}
|
||||||
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren