diff --git a/module/classes/src/main/java/org/battleplugins/arena/module/classes/Classes.java b/module/classes/src/main/java/org/battleplugins/arena/module/classes/Classes.java index ec450513..a88cd96d 100644 --- a/module/classes/src/main/java/org/battleplugins/arena/module/classes/Classes.java +++ b/module/classes/src/main/java/org/battleplugins/arena/module/classes/Classes.java @@ -15,7 +15,6 @@ import org.bukkit.event.EventHandler; import org.jetbrains.annotations.Nullable; -import java.io.File; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; @@ -30,7 +29,7 @@ public class Classes implements ArenaModuleInitializer { public static final EventActionType EQUIP_CLASS_ACTION = EventActionType.create("equip-class", EquipClassAction.class, EquipClassAction::new); public static final ArenaOptionType CLASS_EQUIPPING_OPTION = ArenaOptionType.create("class-equipping", BooleanArenaOption::new); - public static final ArenaOptionType CLASS_EQUIP_ONLY_SELECTS = ArenaOptionType.create("class-equip-only-selects", BooleanArenaOption::new); + public static final ArenaOptionType CLASS_EQUIP_ONLY_SELECTS_OPTION = ArenaOptionType.create("class-equip-only-selects", BooleanArenaOption::new); private ArenaClasses classes; diff --git a/module/classes/src/main/java/org/battleplugins/arena/module/classes/ClassesExecutor.java b/module/classes/src/main/java/org/battleplugins/arena/module/classes/ClassesExecutor.java index d8e40e1b..d2417d4a 100644 --- a/module/classes/src/main/java/org/battleplugins/arena/module/classes/ClassesExecutor.java +++ b/module/classes/src/main/java/org/battleplugins/arena/module/classes/ClassesExecutor.java @@ -41,7 +41,7 @@ public void equip(Player player, @Argument(name = "class") ArenaClass arenaClass .map(BooleanArenaOption::isEnabled) .orElse(false); if (canEquip) { - boolean equipOnlySelects = arenaPlayer.getCompetition().option(Classes.CLASS_EQUIP_ONLY_SELECTS) + boolean equipOnlySelects = arenaPlayer.getCompetition().option(Classes.CLASS_EQUIP_ONLY_SELECTS_OPTION) .map(BooleanArenaOption::isEnabled) .orElse(false); diff --git a/module/classes/src/main/java/org/battleplugins/arena/module/classes/EquipClassAction.java b/module/classes/src/main/java/org/battleplugins/arena/module/classes/EquipClassAction.java index b49b6b6e..9b3d36dc 100644 --- a/module/classes/src/main/java/org/battleplugins/arena/module/classes/EquipClassAction.java +++ b/module/classes/src/main/java/org/battleplugins/arena/module/classes/EquipClassAction.java @@ -47,7 +47,7 @@ public void call(ArenaPlayer arenaPlayer, Resolvable resolvable) { arenaPlayer.getPlayer().getInventory().clear(); } - boolean equipOnlySelects = arenaPlayer.getCompetition().option(Classes.CLASS_EQUIP_ONLY_SELECTS) + boolean equipOnlySelects = arenaPlayer.getCompetition().option(Classes.CLASS_EQUIP_ONLY_SELECTS_OPTION) .map(BooleanArenaOption::isEnabled) .orElse(false); diff --git a/module/scoreboards/src/main/java/org/battleplugins/arena/module/scoreboard/line/PlayerListLineCreator.java b/module/scoreboards/src/main/java/org/battleplugins/arena/module/scoreboard/line/PlayerListLineCreator.java index fff20430..0a1e423c 100644 --- a/module/scoreboards/src/main/java/org/battleplugins/arena/module/scoreboard/line/PlayerListLineCreator.java +++ b/module/scoreboards/src/main/java/org/battleplugins/arena/module/scoreboard/line/PlayerListLineCreator.java @@ -18,7 +18,7 @@ public class PlayerListLineCreator implements ScoreboardLineCreator { private int maxEntries; @ArenaOption(name = "show-team-color", description = "Whether to show the team color of the player.") - private boolean showTeamColor; + private boolean showTeamColor = true; @ArenaOption(name = "require-alive", description = "Whether to only show alive players.") private boolean requireAlive; diff --git a/module/scoreboards/src/main/java/org/battleplugins/arena/module/scoreboard/line/TopStatLineCreator.java b/module/scoreboards/src/main/java/org/battleplugins/arena/module/scoreboard/line/TopStatLineCreator.java index 85f6b0f6..e2afd005 100644 --- a/module/scoreboards/src/main/java/org/battleplugins/arena/module/scoreboard/line/TopStatLineCreator.java +++ b/module/scoreboards/src/main/java/org/battleplugins/arena/module/scoreboard/line/TopStatLineCreator.java @@ -29,7 +29,7 @@ public class TopStatLineCreator implements ScoreboardLineCreator { private boolean ascending; @ArenaOption(name = "show-team-color", description = "Whether to show the team color of the player.") - private boolean showTeamColor; + private boolean showTeamColor = true; @SuppressWarnings("unchecked") @Override diff --git a/module/scoreboards/src/main/resources/scoreboards.yml b/module/scoreboards/src/main/resources/scoreboards.yml index be7a8755..36cd59bf 100644 --- a/module/scoreboards/src/main/resources/scoreboards.yml +++ b/module/scoreboards/src/main/resources/scoreboards.yml @@ -31,6 +31,7 @@ templates: lines: - " " - "Players: %online_players%/%max_players%" + - "Map: %map%" - " " - "battleplugins.org" ingame-list: @@ -41,9 +42,11 @@ templates: lines: - " " - "Map: %map%" + - "Time remaining: %time_remaining_short%" + - " " - "Players:" - player-list: - max-entries: 10 + max-entries: 8 - simple: lines: - " " @@ -56,9 +59,11 @@ templates: lines: - " " - "Map: %map%" + - "Time remaining: %time_remaining_short%" + - " " - "Alive players:" - player-list: - max-entries: 10 + max-entries: 8 require-alive: true - simple: lines: @@ -72,10 +77,12 @@ templates: lines: - " " - "Map: %map%" + - "Time remaining: %time_remaining_short%" + - " " - "Top kills:" - top-stat: stat: kills - max-entries: 10 + max-entries: 8 - simple: lines: - " " diff --git a/module/team-colors/build.gradle.kts b/module/team-colors/build.gradle.kts new file mode 100644 index 00000000..e69de29b diff --git a/module/team-colors/src/main/java/org/battleplugins/arena/module/teamcolors/TeamColors.java b/module/team-colors/src/main/java/org/battleplugins/arena/module/teamcolors/TeamColors.java new file mode 100644 index 00000000..72cb52fd --- /dev/null +++ b/module/team-colors/src/main/java/org/battleplugins/arena/module/teamcolors/TeamColors.java @@ -0,0 +1,167 @@ +package org.battleplugins.arena.module.teamcolors; + +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; +import org.battleplugins.arena.ArenaPlayer; +import org.battleplugins.arena.BattleArena; +import org.battleplugins.arena.competition.LiveCompetition; +import org.battleplugins.arena.event.arena.ArenaPhaseStartEvent; +import org.battleplugins.arena.event.player.ArenaJoinEvent; +import org.battleplugins.arena.event.player.ArenaLeaveEvent; +import org.battleplugins.arena.event.player.ArenaTeamJoinEvent; +import org.battleplugins.arena.event.player.ArenaTeamLeaveEvent; +import org.battleplugins.arena.module.ArenaModule; +import org.battleplugins.arena.module.ArenaModuleInitializer; +import org.battleplugins.arena.options.ArenaOptionType; +import org.battleplugins.arena.options.types.BooleanArenaOption; +import org.battleplugins.arena.team.ArenaTeam; +import org.battleplugins.arena.team.ArenaTeams; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.scoreboard.Team; + +/** + * A module that adds team colors to a player's name. + */ +@ArenaModule(id = TeamColors.ID, name = "Team Colors", description = "Adds player team colors to their name.", authors = "BattlePlugins") +public class TeamColors implements ArenaModuleInitializer { + public static final String ID = "team-colors"; + public static final ArenaOptionType TEAM_PREFIXES = ArenaOptionType.create("team-prefixes", BooleanArenaOption::new); + + @EventHandler + public void onJoin(ArenaJoinEvent event) { + if (!event.getArena().isModuleEnabled(ID)) { + return; + } + + this.post(5, () -> { + for (ArenaTeam team : event.getCompetition().getTeamManager().getTeams()) { + // Register a new Bukkit team for each team in the competition + Team bukkitTeam = event.getPlayer().getScoreboard().getTeam("ba-" + team.getName()); + if (bukkitTeam != null) { + bukkitTeam = event.getPlayer().getScoreboard().registerNewTeam("ba-" + team.getName()); + bukkitTeam.displayName(team.getFormattedName()); + bukkitTeam.color(NamedTextColor.nearestTo(team.getTextColor())); + if (showTeamPrefixes(event.getCompetition(), team)) { + bukkitTeam.prefix(Component.text("[" + team.getName() + "] ", team.getTextColor())); + } + } + + // If players are already on the team, add them to the Bukkit team + for (ArenaPlayer teamPlayer : event.getCompetition().getTeamManager().getPlayersOnTeam(team)) { + bukkitTeam.addPlayer(teamPlayer.getPlayer()); + } + } + }); + } + + @EventHandler + public void onPhaseStart(ArenaPhaseStartEvent event) { + if (!event.getArena().isModuleEnabled(ID)) { + return; + } + + this.post(5, () -> { + // Scoreboards may change when phases change, so update + // team colors in player scoreboards when this happens + if (event.getCompetition() instanceof LiveCompetition liveCompetition) { + for (ArenaPlayer arenaPlayer : liveCompetition.getPlayers()) { + Player player = arenaPlayer.getPlayer(); + for (ArenaTeam team : liveCompetition.getTeamManager().getTeams()) { + Team bukkitTeam = player.getScoreboard().getTeam("ba-" + team.getName()); + if (bukkitTeam == null) { + bukkitTeam = player.getScoreboard().registerNewTeam("ba-" + team.getName()); + bukkitTeam.displayName(team.getFormattedName()); + bukkitTeam.color(NamedTextColor.nearestTo(team.getTextColor())); + if (showTeamPrefixes(liveCompetition, team)) { + bukkitTeam.prefix(Component.text("[" + team.getName() + "] ", team.getTextColor())); + } + } + + for (ArenaPlayer teamPlayer : arenaPlayer.getCompetition().getTeamManager().getPlayersOnTeam(team)) { + bukkitTeam.addPlayer(teamPlayer.getPlayer()); + } + } + } + } + }); + } + + @EventHandler + public void onLeave(ArenaLeaveEvent event) { + if (!event.getArena().isModuleEnabled(ID)) { + return; + } + + this.post(5, () -> { + if (event.getArenaPlayer().getTeam() != null) { + this.leaveTeam(event.getPlayer(), event.getCompetition(), event.getArenaPlayer().getTeam()); + } + + // Remove all teams for the player + for (ArenaTeam team : event.getCompetition().getTeamManager().getTeams()) { + Team bukkitTeam = event.getPlayer().getScoreboard().getTeam("ba-" + team.getName()); + if (bukkitTeam != null) { + bukkitTeam.unregister(); + } + } + }); + } + + @EventHandler + public void onTeamJoin(ArenaTeamJoinEvent event) { + if (!event.getArena().isModuleEnabled(ID)) { + return; + } + + this.post(5, () -> this.joinTeam(event.getPlayer(), event.getCompetition(), event.getTeam())); + } + + @EventHandler + public void onTeamLeave(ArenaTeamLeaveEvent event) { + if (!event.getArena().isModuleEnabled(ID)) { + return; + } + + this.post(5, () -> this.leaveTeam(event.getPlayer(), event.getCompetition(), event.getTeam())); + } + + private void joinTeam(Player player, LiveCompetition competition, ArenaTeam arenaTeam) { + for (ArenaPlayer arenaPlayer : competition.getPlayers()) { + Player competitionPlayer = arenaPlayer.getPlayer(); + + Team team = competitionPlayer.getScoreboard().getTeam("ba-" + arenaTeam.getName()); + if (team == null) { + BattleArena.getInstance().warn("Team {} does not have a Bukkit team registered for {}!", arenaTeam.getName(), player.getName()); + continue; + } + + team.addPlayer(player); + } + } + + private void leaveTeam(Player player, LiveCompetition competition, ArenaTeam arenaTeam) { + for (ArenaPlayer arenaPlayer : competition.getPlayers()) { + Player competitionPlayer = arenaPlayer.getPlayer(); + Team team = competitionPlayer.getScoreboard().getTeam("ba-" + arenaTeam.getName()); + if (team != null) { + team.removePlayer(player); + } + } + } + + private void post(int ticks, Runnable runnable) { + Bukkit.getScheduler().runTaskLater(BattleArena.getInstance(), runnable, ticks); + } + + private static boolean showTeamPrefixes(LiveCompetition competition, ArenaTeam team) { + if (team == ArenaTeams.DEFAULT) { + return false; + } + + return competition.option(TEAM_PREFIXES) + .map(BooleanArenaOption::isEnabled) + .orElse(true); + } +} diff --git a/plugin/src/main/java/org/battleplugins/arena/competition/CompetitionManager.java b/plugin/src/main/java/org/battleplugins/arena/competition/CompetitionManager.java index 059c8dc9..048ca8c6 100644 --- a/plugin/src/main/java/org/battleplugins/arena/competition/CompetitionManager.java +++ b/plugin/src/main/java/org/battleplugins/arena/competition/CompetitionManager.java @@ -176,7 +176,7 @@ public void removeCompetition(Arena arena, Competition competition) { liveCompetition.getPhaseManager().end(true); } else { // No victory phase - just forcefully kick every player - for (ArenaPlayer player : liveCompetition.getPlayers()) { + for (ArenaPlayer player : Set.copyOf(liveCompetition.getPlayers())) { liveCompetition.leave(player, ArenaLeaveEvent.Cause.SHUTDOWN); } } diff --git a/plugin/src/main/java/org/battleplugins/arena/competition/OptionsListener.java b/plugin/src/main/java/org/battleplugins/arena/competition/OptionsListener.java index e16d1e45..ff3bc084 100644 --- a/plugin/src/main/java/org/battleplugins/arena/competition/OptionsListener.java +++ b/plugin/src/main/java/org/battleplugins/arena/competition/OptionsListener.java @@ -8,6 +8,7 @@ import org.battleplugins.arena.options.types.BooleanArenaOption; import org.battleplugins.arena.options.types.EnumArenaOption; import org.bukkit.entity.Player; +import org.bukkit.entity.Projectile; import org.bukkit.event.EventPriority; import org.bukkit.event.block.Action; import org.bukkit.event.block.BlockBreakEvent; @@ -81,53 +82,64 @@ public void onPlayerDeath(PlayerDeathEvent event) { @ArenaEventHandler(priority = EventPriority.LOWEST) public void onEntityDamage(EntityDamageByEntityEvent event) { - if (event.getDamager() instanceof Player damager) { - if (!(event.getEntity() instanceof Player damaged)) { - DamageOption damageOption = this.competition.option(ArenaOptionType.DAMAGE_ENTITIES) - .map(EnumArenaOption::getOption) - .orElse(DamageOption.ALWAYS); - - if (damageOption == DamageOption.NEVER) { - event.setCancelled(true); - } + Player damager; + if (event.getDamager() instanceof Player eventDamager) { + damager = eventDamager; + } else if (event.getDamager() instanceof Projectile projectile) { + if (projectile.getShooter() instanceof Player shooter) { + damager = shooter; } else { - // Player damage checking is slightly more complicated - DamageOption damageOption = this.competition.option(ArenaOptionType.DAMAGE_PLAYERS) - .map(EnumArenaOption::getOption) - .orElse(DamageOption.ALWAYS); - - // If the damage option is always, then assume damage is enabled in - // any case and just return here - if (damageOption == DamageOption.ALWAYS) { - return; - } + return; + } + } else { + return; + } - ArenaPlayer damagerPlayer = ArenaPlayer.getArenaPlayer(damager); - ArenaPlayer damagedPlayer = ArenaPlayer.getArenaPlayer(damaged); + if (!(event.getEntity() instanceof Player damaged)) { + DamageOption damageOption = this.competition.option(ArenaOptionType.DAMAGE_ENTITIES) + .map(EnumArenaOption::getOption) + .orElse(DamageOption.ALWAYS); - // Ensure that both players exist and are in an arena - if ((damagerPlayer == null && damagedPlayer != null) || (damagerPlayer != null && damagedPlayer == null)) { - return; - } + if (damageOption == DamageOption.NEVER) { + event.setCancelled(true); + } + } else { + // Player damage checking is slightly more complicated + DamageOption damageOption = this.competition.option(ArenaOptionType.DAMAGE_PLAYERS) + .map(EnumArenaOption::getOption) + .orElse(DamageOption.ALWAYS); + + // If the damage option is always, then assume damage is enabled in + // any case and just return here + if (damageOption == DamageOption.ALWAYS) { + return; + } - // Check to see if players are in the same arena - if (damagerPlayer != null && !damagerPlayer.getCompetition().equals(damagedPlayer.getCompetition())) { - return; - } + ArenaPlayer damagerPlayer = ArenaPlayer.getArenaPlayer(damager); + ArenaPlayer damagedPlayer = ArenaPlayer.getArenaPlayer(damaged); - // If the damage option is never, then cancel the event - if (damageOption == DamageOption.NEVER) { - event.setCancelled(true); - return; - } + // Ensure that both players exist and are in an arena + if ((damagerPlayer == null && damagedPlayer != null) || (damagerPlayer != null && damagedPlayer == null)) { + return; + } + + // Check to see if players are in the same arena + if (damagerPlayer != null && !damagerPlayer.getCompetition().equals(damagedPlayer.getCompetition())) { + return; + } + + // If the damage option is never, then cancel the event + if (damageOption == DamageOption.NEVER) { + event.setCancelled(true); + return; + } - // Cancel the event if the damage option is other team and the - // players are on the same team - if (damageOption == DamageOption.OTHER_TEAM && damagerPlayer != null) { - if (damagerPlayer.getTeam() != null && damagedPlayer.getTeam() != null) { - if (!damagerPlayer.getTeam().isHostileTo(damagedPlayer.getTeam())) { - event.setCancelled(true); - } + // Cancel the event if the damage option is other team and the + // players are on the same team + if (damageOption == DamageOption.OTHER_TEAM && damagerPlayer != null) { + if (damagerPlayer.getTeam() != null && damagedPlayer.getTeam() != null) { + if (!damagerPlayer.getTeam().isHostileTo(damagedPlayer.getTeam())) { + event.setCancelled(true); } } } diff --git a/plugin/src/main/java/org/battleplugins/arena/competition/victory/types/TimeLimitCondition.java b/plugin/src/main/java/org/battleplugins/arena/competition/victory/types/TimeLimitCondition.java index 2a67414a..4cef1613 100644 --- a/plugin/src/main/java/org/battleplugins/arena/competition/victory/types/TimeLimitCondition.java +++ b/plugin/src/main/java/org/battleplugins/arena/competition/victory/types/TimeLimitCondition.java @@ -58,6 +58,7 @@ public Duration getTimeRemaining() { public Resolver resolve() { return super.resolve().toBuilder() .define(ResolverKeys.TIME_REMAINING, ResolverProvider.simple(this.getTimeRemaining(), Util::toTimeString)) + .define(ResolverKeys.TIME_REMAINING_SHORT, ResolverProvider.simple(this.getTimeRemaining(), Util::toTimeStringShort)) .build(); } } diff --git a/plugin/src/main/java/org/battleplugins/arena/resolver/ResolverKeys.java b/plugin/src/main/java/org/battleplugins/arena/resolver/ResolverKeys.java index b3ba0d48..edba4499 100644 --- a/plugin/src/main/java/org/battleplugins/arena/resolver/ResolverKeys.java +++ b/plugin/src/main/java/org/battleplugins/arena/resolver/ResolverKeys.java @@ -33,6 +33,7 @@ public final class ResolverKeys { public static final ResolverKey PHASE = ResolverKey.create("phase", CompetitionPhase.class); public static final ResolverKey TEAM = ResolverKey.create("team", ArenaTeam.class); public static final ResolverKey TIME_REMAINING = ResolverKey.create("time-remaining", Duration.class); + public static final ResolverKey TIME_REMAINING_SHORT = ResolverKey.create("time-remaining-short", Duration.class); public static final ResolverKey REMAINING_START_TIME = ResolverKey.create("remaining-start-time", Duration.class); public static final ResolverKey VICTORY_CONDITION_TYPE = ResolverKey.create("victory-condition-type", VictoryConditionType.class); } diff --git a/plugin/src/main/java/org/battleplugins/arena/util/Util.java b/plugin/src/main/java/org/battleplugins/arena/util/Util.java index ea901dfc..8b3d4e25 100644 --- a/plugin/src/main/java/org/battleplugins/arena/util/Util.java +++ b/plugin/src/main/java/org/battleplugins/arena/util/Util.java @@ -26,6 +26,10 @@ public static String toTimeStringShort(Duration duration) { long minutes = (seconds % 3600) / 60; seconds = seconds % 60; + if (hours == 0) { + return String.format("%02d:%02d", minutes, seconds); + } + return String.format("%02d:%02d:%02d", hours, minutes, seconds); } diff --git a/plugin/src/main/resources/arenas/arena.yml b/plugin/src/main/resources/arenas/arena.yml index a5414f15..4bf4ec4a 100644 --- a/plugin/src/main/resources/arenas/arena.yml +++ b/plugin/src/main/resources/arenas/arena.yml @@ -53,6 +53,8 @@ phases: - damage-players{option=never} - class-equipping{enabled=true} events: + on-start: + - apply-scoreboard{scoreboard=waiting} on-join: - apply-scoreboard{scoreboard=waiting} countdown: @@ -88,6 +90,7 @@ phases: events: on-complete: - leave + - restore-arena - remove-scoreboard on-victory: - send-message{message=Congrats, you won!} diff --git a/plugin/src/main/resources/arenas/battlegrounds.yml b/plugin/src/main/resources/arenas/battlegrounds.yml index 494e6fbc..dfb354f2 100644 --- a/plugin/src/main/resources/arenas/battlegrounds.yml +++ b/plugin/src/main/resources/arenas/battlegrounds.yml @@ -36,7 +36,9 @@ events: on-death: - respawn on-respawn: + - delay{ticks=1} - teleport{location=team_spawn;random=true} + - equip-class{class=warrior} options: - block-break{enabled=false} - block-place{enabled=false} @@ -54,6 +56,8 @@ phases: - damage-players{option=never} - class-equipping{enabled=true} events: + on-start: + - apply-scoreboard{scoreboard=waiting} on-join: - apply-scoreboard{scoreboard=waiting} countdown: @@ -91,6 +95,7 @@ phases: events: on-complete: - leave + - restore-arena - remove-scoreboard on-victory: - send-message{message=Congrats, you won!} diff --git a/plugin/src/main/resources/arenas/colosseum.yml b/plugin/src/main/resources/arenas/colosseum.yml index ff5152ff..81cb3d83 100644 --- a/plugin/src/main/resources/arenas/colosseum.yml +++ b/plugin/src/main/resources/arenas/colosseum.yml @@ -56,6 +56,8 @@ phases: - damage-players{option=never} - class-equipping{enabled=true} events: + on-start: + - apply-scoreboard{scoreboard=waiting} on-join: - apply-scoreboard{scoreboard=waiting} countdown: @@ -91,6 +93,7 @@ phases: events: on-complete: - leave + - restore-arena - remove-scoreboard on-victory: - send-message{message=Congrats, you won!} diff --git a/plugin/src/main/resources/arenas/deathmatch.yml b/plugin/src/main/resources/arenas/deathmatch.yml index 3726c599..a58a1651 100644 --- a/plugin/src/main/resources/arenas/deathmatch.yml +++ b/plugin/src/main/resources/arenas/deathmatch.yml @@ -35,8 +35,11 @@ events: - remove-scoreboard on-death: - respawn + - clear-inventory on-respawn: + - delay{ticks=1} - teleport{location=team_spawn;random=true} + - equip-class{class=warrior} options: - block-break{enabled=false} - block-place{enabled=false} @@ -54,6 +57,8 @@ phases: - damage-players{option=never} - class-equipping{enabled=true} events: + on-start: + - apply-scoreboard{scoreboard=waiting} on-join: - apply-scoreboard{scoreboard=waiting} countdown: @@ -93,6 +98,7 @@ phases: on-complete: - leave - teardown + - restore-arena - remove-scoreboard on-victory: - send-message{message=Congrats, you won!} diff --git a/plugin/src/main/resources/arenas/ffa.yml b/plugin/src/main/resources/arenas/ffa.yml index c9494261..559cb221 100644 --- a/plugin/src/main/resources/arenas/ffa.yml +++ b/plugin/src/main/resources/arenas/ffa.yml @@ -55,6 +55,8 @@ phases: - damage-players{option=never} - class-equipping{enabled=true} events: + on-start: + - apply-scoreboard{scoreboard=waiting} on-join: - apply-scoreboard{scoreboard=waiting} countdown: @@ -94,6 +96,7 @@ phases: on-complete: - leave - teardown + - restore-arena - remove-scoreboard on-victory: - send-message{message=Congrats, you won!} diff --git a/settings.gradle.kts b/settings.gradle.kts index cb329355..22e7e940 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -22,6 +22,7 @@ include("module:arena-restoration") include("module:boundary-enforcer") include("module:classes") include("module:scoreboards") +include("module:team-colors") include("module:team-heads") include("module:tournaments") include("module:vault-integration") \ No newline at end of file