Archiviert
1
0

Remove CalendarCommand and CalendarListener from Bungee

Dieser Commit ist enthalten in:
yoyosource 2023-11-29 18:15:20 +01:00
Ursprung bb8b46c437
Commit 6f31058d61

Datei anzeigen

@ -85,10 +85,11 @@ public class CheckCommand extends SWCommand {
Message.sendPrefixless("CHECK_LIST_HEADER", player, schematicList.size()); Message.sendPrefixless("CHECK_LIST_HEADER", player, schematicList.size());
SteamwarUser steamwarUser = SteamwarUser.get(player.getUniqueId()); SteamwarUser steamwarUser = SteamwarUser.get(player.getUniqueId());
int playerTeam = steamwarUser.hasPerm(UserPerm.MODERATION) ? -1 : steamwarUser.getTeam(); int playerTeam = steamwarUser.hasPerm(UserPerm.MODERATION) ? 0 : steamwarUser.getTeam();
for (SchematicNode schematic : schematicList) { for (SchematicNode schematic : schematicList) {
SteamwarUser schematicOwner = SteamwarUser.get(schematic.getOwner());
CheckSession current = currentSchems.get(schematic.getId()); CheckSession current = currentSchems.get(schematic.getId());
boolean sameTeam = SteamwarUser.get(schematic.getOwner()).getTeam() == playerTeam; boolean sameTeam = schematicOwner.getTeam() != 0 && schematicOwner.getTeam() == playerTeam;
long waitedMillis = Timestamp.from(Instant.now()).getTime() - schematic.getLastUpdate().getTime(); long waitedMillis = Timestamp.from(Instant.now()).getTime() - schematic.getLastUpdate().getTime();
String color = waitedMillis > 14400000 ? (waitedMillis > 86400000 ? "§c" : "§e") : "§a"; String color = waitedMillis > 14400000 ? (waitedMillis > 86400000 ? "§c" : "§e") : "§a";
long hours = waitedMillis / 3600000; long hours = waitedMillis / 3600000;
@ -99,13 +100,13 @@ public class CheckCommand extends SWCommand {
Message.parse("CHECK_LIST_TO_CHECK_HOVER", player), Message.parse("CHECK_LIST_TO_CHECK_HOVER", player),
sameTeam ? null : new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check schematic " + schematic.getId()), sameTeam ? null : new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check schematic " + schematic.getId()),
waitTime, waitTime,
schematic.getSchemtype().getKuerzel(), SteamwarUser.get(schematic.getOwner()).getUserName(), schematic.getName()); schematic.getSchemtype().getKuerzel(), schematicOwner.getUserName(), schematic.getName());
} else { } else {
Message.sendPrefixless("CHECK_LIST_CHECKING", player, Message.sendPrefixless("CHECK_LIST_CHECKING", player,
Message.parse("CHECK_LIST_CHECKING_HOVER", player), Message.parse("CHECK_LIST_CHECKING_HOVER", player),
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + current.checker.getName()), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + current.checker.getName()),
waitTime, waitTime,
schematic.getSchemtype().getKuerzel(), SteamwarUser.get(schematic.getOwner()).getUserName(), schematic.getName(), current.checker.getName()); schematic.getSchemtype().getKuerzel(), schematicOwner.getUserName(), schematic.getName(), current.checker.getName());
} }
} }
} }