Dieser Commit ist enthalten in:
Ursprung
3b358a8666
Commit
3ba59c8476
@ -34,8 +34,11 @@ import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.config.Configuration;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.sql.Timestamp;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
@ -127,13 +130,18 @@ public class CheckCommand extends BasicCommand {
|
||||
|
||||
for (SchematicNode schematic : schematicList) {
|
||||
CheckSession current = currentSchems.get(schematic.getId());
|
||||
long waitedMillis = Timestamp.from(Instant.now()).getTime() - schematic.getLastUpdate().getTime();
|
||||
String color = waitedMillis > 14400000 ? (waitedMillis > 86400000 ? "§c" : "§e") : "§a";
|
||||
String waitTime = Timestamp.from(Instant.ofEpochMilli(waitedMillis)).toLocalDateTime().format(DateTimeFormatter.ofPattern(Message.parse("CHECK_LIST_WAIT", player, color)));
|
||||
if (current == null) {
|
||||
Message.sendPrefixless("CHECK_LIST_TO_CHECK", player,
|
||||
waitTime,
|
||||
Message.parse("CHECK_LIST_TO_CHECK_HOVER", player),
|
||||
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check schematic " + schematic.getId()),
|
||||
schematic.getSchemtype().getKuerzel(), SteamwarUser.get(schematic.getOwner()).getUserName(), schematic.getName());
|
||||
} else {
|
||||
Message.sendPrefixless("CHECK_LIST_CHECKING", player,
|
||||
waitTime,
|
||||
Message.parse("CHECK_LIST_CHECKING_HOVER", player),
|
||||
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + current.checker.getName()),
|
||||
schematic.getSchemtype().getKuerzel(), SteamwarUser.get(schematic.getOwner()).getUserName(), schematic.getName(), current.checker.getName());
|
||||
|
@ -245,9 +245,10 @@ CHECK_HELP_NEXT=§8/§7check next §8- §7Nächste Prüffrage§8/§7freigeben
|
||||
CHECK_HELP_DECLINE=§8/§7check decline §8[§eGrund§8] - §7Schematic ablehnen
|
||||
CHECK_HELP_CANCEL=§8/§7check cancel §8- §7Bricht den Prüfvorgang ab
|
||||
CHECK_LIST_HEADER=§e§lZu prüfen sind {0} Schematics
|
||||
CHECK_LIST_TO_CHECK=§8{0} §7{1} §e{2}
|
||||
CHECK_LIST_TO_CHECK={0} §8{1} §7{2} §e{3}
|
||||
CHECK_LIST_WAIT={0}d HH:mm
|
||||
CHECK_LIST_TO_CHECK_HOVER=§eSchematic prüfen
|
||||
CHECK_LIST_CHECKING=§8{0} §7{1} §e{2} §7wird geprüft von §e{3}
|
||||
CHECK_LIST_CHECKING={0} §8{1} §7{2} §e{3} §7wird geprüft von §e{4}
|
||||
CHECK_LIST_CHECKING_HOVER=§eZum Prüfer
|
||||
CHECK_SCHEMATIC_ALREADY_CHECKING=§cDu prüfst schon eine Schematic!
|
||||
CHECK_SCHEMATIC_OWN=§cDu kannst nicht deine eigenen Schematics prüfen.
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren