From 5b05fb1914ea515ec96bd88ee718e8888f7cbe79 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 8 Oct 2022 18:46:28 +0200 Subject: [PATCH] Hotfix FightTeam --- .../src/de/steamwar/fightsystem/fight/FightTeam.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java b/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java index 53486b5..47ba81f 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/fight/FightTeam.java @@ -32,6 +32,7 @@ import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.OneShotStateDependent; import de.steamwar.fightsystem.states.StateDependent; import de.steamwar.fightsystem.utils.*; +import de.steamwar.fightsystem.winconditions.Winconditions; import de.steamwar.inventory.SWItem; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SteamwarUser; @@ -128,7 +129,9 @@ public class FightTeam { WorldOfColorWrapper.impl.setTeamColor(team, color); BountifulWrapper.impl.setNametagVisibility(team); team.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS); - team.setAllowFriendlyFire(false); + if (!Config.ActiveWinconditions.contains(Winconditions.AMONG_US)) { + team.setAllowFriendlyFire(false); + } new OneShotStateDependent(ArenaMode.Restartable, FightState.PreLeaderSetup, () -> Bukkit.getScheduler().runTask(FightSystem.getPlugin(), this::reset)); new OneShotStateDependent(Config.replayserver(), FightState.PreLeaderSetup, () -> Bukkit.getScheduler().runTask(FightSystem.getPlugin(), this::reset)); -- 2.39.2