From df3e082774e0b8323a4b76c757dec1dd88e9923c Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 18 Jul 2023 22:11:19 +0200 Subject: [PATCH] Hotfix build --- .../bungeecore/commands/TeamCommand.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/TeamCommand.java b/src/de/steamwar/bungeecore/commands/TeamCommand.java index c89e44d..58273bd 100644 --- a/src/de/steamwar/bungeecore/commands/TeamCommand.java +++ b/src/de/steamwar/bungeecore/commands/TeamCommand.java @@ -177,7 +177,6 @@ public class TeamCommand extends SWCommand { } user.setTeam(t); - if (user.isPunished(Punishment.PunishmentType.NoTeamEventParticipation)) removeTeamTeilnahme(t); teamInvitations.remove(user.getId()); Message.send("TEAM_JOIN_JOINED", player, Team.get(t).getTeamName()); } @@ -248,10 +247,6 @@ public class TeamCommand extends SWCommand { return; } - if (target.isPunished(Punishment.PunishmentType.NoTeamEventParticipation)) { - Message.send("UNNOTEAMEVENTPARTICIPATION_NOTICE", player); - } - teamInvitations.get(target.getId()).add(team.getTeamId()); Message.send("TEAM_INVITE_INVITED", player, toInvite); @@ -487,10 +482,6 @@ public class TeamCommand extends SWCommand { TeamTeilnahme.notTeilnehmen(team.getTeamId(), event.getEventID()); Message.send("TEAM_EVENT_LEFT", player); }else{ - if (checkNoEventPunished(team.getTeamId())) { - Message.send("UNNOTEAMEVENTPARTICIPATION_MESSAGE", player); - return; - } TeamTeilnahme.teilnehmen(team.getTeamId(), event.getEventID()); Message.send("TEAM_EVENT_JOINED", player, event.getEventName()); Message.sendPrefixless("TEAM_EVENT_HOW_TO_LEAVE", player); @@ -695,16 +686,4 @@ public class TeamCommand extends SWCommand { } return false; } - - public static void removeTeamTeilnahme(int team) { - Event.getComing() - .stream() - .filter(event -> TeamTeilnahme.nimmtTeil(team, event.getEventID())) - .forEach(event -> TeamTeilnahme.notTeilnehmen(team, event.getEventID())); - } - - public static boolean checkNoEventPunished(int team) { - return SteamwarUser.getTeam(team).stream() - .anyMatch(steamwarUser -> steamwarUser.isPunished(Punishment.PunishmentType.NoTeamEventParticipation)); - } }