From 6f31058d61edd5d24d98b88bff7467eacaee6c81 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 29 Nov 2023 18:15:20 +0100 Subject: [PATCH] Remove CalendarCommand and CalendarListener from Bungee --- src/de/steamwar/bungeecore/commands/CheckCommand.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/CheckCommand.java b/src/de/steamwar/bungeecore/commands/CheckCommand.java index b47adec8..c803bbe8 100644 --- a/src/de/steamwar/bungeecore/commands/CheckCommand.java +++ b/src/de/steamwar/bungeecore/commands/CheckCommand.java @@ -85,10 +85,11 @@ public class CheckCommand extends SWCommand { Message.sendPrefixless("CHECK_LIST_HEADER", player, schematicList.size()); 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) { + SteamwarUser schematicOwner = SteamwarUser.get(schematic.getOwner()); 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(); String color = waitedMillis > 14400000 ? (waitedMillis > 86400000 ? "§c" : "§e") : "§a"; long hours = waitedMillis / 3600000; @@ -99,13 +100,13 @@ public class CheckCommand extends SWCommand { Message.parse("CHECK_LIST_TO_CHECK_HOVER", player), sameTeam ? null : new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/check schematic " + schematic.getId()), waitTime, - schematic.getSchemtype().getKuerzel(), SteamwarUser.get(schematic.getOwner()).getUserName(), schematic.getName()); + schematic.getSchemtype().getKuerzel(), schematicOwner.getUserName(), schematic.getName()); } else { Message.sendPrefixless("CHECK_LIST_CHECKING", player, Message.parse("CHECK_LIST_CHECKING_HOVER", player), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + current.checker.getName()), waitTime, - schematic.getSchemtype().getKuerzel(), SteamwarUser.get(schematic.getOwner()).getUserName(), schematic.getName(), current.checker.getName()); + schematic.getSchemtype().getKuerzel(), schematicOwner.getUserName(), schematic.getName(), current.checker.getName()); } } }