Skip to content

Commit

Permalink
fix kit giving for normal team duels too
Browse files Browse the repository at this point in the history
  • Loading branch information
Inf1nityy committed Dec 14, 2024
1 parent d181849 commit 462399b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
import net.minecraft.sounds.SoundSource;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Random;
import java.util.UUID;

import static com.nexia.minigames.games.duels.gamemodes.GamemodeHandler.removeQueue;

public class TeamDuelsGame extends DuelsGame {
Expand Down Expand Up @@ -114,6 +116,7 @@ public static TeamDuelsGame startGame(@NotNull DuelsTeam team1, @NotNull DuelsTe
.append(Component.text(team2.getLeader().getRawName() + "'s Team", ChatFormat.brandColor2))
);

player.reset(true, Minecraft.GameMode.ADVENTURE);
DuelGameHandler.loadInventory(player, stringGameMode);

if (!gameMode.hasSaturation) {
Expand All @@ -122,8 +125,6 @@ public static TeamDuelsGame startGame(@NotNull DuelsTeam team1, @NotNull DuelsTe

player.removeTag(LobbyUtil.NO_DAMAGE_TAG);
player.removeTag(LobbyUtil.NO_FALL_DAMAGE_TAG);

player.reset(true, Minecraft.GameMode.ADVENTURE);
}

for (NexiaPlayer player : team2.all) {
Expand All @@ -144,6 +145,7 @@ public static TeamDuelsGame startGame(@NotNull DuelsTeam team1, @NotNull DuelsTe
.append(Component.text(team1.getLeader().getRawName() + "'s Team", ChatFormat.brandColor2))
);

player.reset(true, Minecraft.GameMode.ADVENTURE);
DuelGameHandler.loadInventory(player, stringGameMode);

if (!gameMode.hasSaturation) {
Expand All @@ -152,8 +154,6 @@ public static TeamDuelsGame startGame(@NotNull DuelsTeam team1, @NotNull DuelsTe

player.removeTag(LobbyUtil.NO_DAMAGE_TAG);
player.removeTag(LobbyUtil.NO_FALL_DAMAGE_TAG);

player.reset(true, Minecraft.GameMode.ADVENTURE);
}

game.uuid = gameUUID;
Expand Down

0 comments on commit 462399b

Please sign in to comment.