Survival Games
This is a gamemode that adds survival games to BattleArena. This requires the PhatLoots plugin for the chest configuration.
Description
- Players spawn on an island with chests
- Chests contain loot which players loot for items
- Last player standing wins the game
Configuring Chests
Chests are configured using the PhatLoots plugin which contains native support for BattleArena and adds the reset-loot-tables action used in the configuration below.
Using PhatLoots, you can create loot tables and link them to blocks (using the /loot link <loot table> command). The following configurations are provided as island and center loot tables, and can be placed inside the plugins/PhatLoots/LootTables directory. Then, using PhatLoots, you can link these to chest blocks by running /loot link island and /loot link center for island and center chests respectively.
Arena Configuration
name: SkyWars
mode: Arena
type: Match
team-options:
named-teams: false
team-size: 1
team-amount: 2+
team-selection: none
modules:
- duels
- scoreboards
lives:
enabled: false
victory-conditions:
teams-alive:
amount: 1
time-limit:
time-limit: 5m
events:
on-join:
- store{types=all}
- change-gamemode{gamemode=adventure}
- flight{enabled=false}
- teleport{location=waitroom}
on-spectate:
- store{types=all}
- change-gamemode{gamemode=spectator}
- flight{enabled=true}
- teleport{location=spectator}
on-leave:
- clear-effects
- restore{types=all}
- remove-scoreboard
on-death:
- clear-inventory
- respawn
- delay{ticks=1}
- teleport{location=waitroom}
options:
- block-break{enabled=false}
- block-place{enabled=false}
- block-interact{enabled=false}
- damage-entities{option=never}
- keep-inventory{enabled=true}
- keep-experience{enabled=true}
- shuffle-loot{enabled=true}
initial-phase: waiting
phases:
waiting:
allow-join: true
next-phase: countdown
options:
- damage-players{option=never}
events:
on-start:
- apply-scoreboard{scoreboard=waiting}
on-join:
- apply-scoreboard{scoreboard=waiting}
countdown:
allow-join: true
allow-spectate: true
revert-phase: true
next-phase: ingame
countdown-time: 60s
options:
- damage-players{option=never}
events:
on-start:
- apply-scoreboard{scoreboard=countdown}
ingame:
allow-join: false
allow-spectate: true
next-phase: victory
options:
- damage-players{option=other_team}
- block-break{enabled=true}
- block-place{enabled=true}
- block-interact{enabled=true}
events:
on-start:
- change-gamemode{gamemode=survival}
- reset-loot-tables
- teleport{location=team_spawn}
- play-sound{sound=block.note_block.pling;pitch=2;volume=1}
- apply-scoreboard{scoreboard=ingame-list}
victory:
allow-join: false
allow-spectate: false
next-phase: waiting
duration: 5s
events:
on-complete:
- leave
- remove-scoreboard
on-victory:
- send-message{message=<green>Congrats, you won!</green>}
- play-sound{sound=entity.player.levelup;pitch=1;volume=1}
on-lose:
- send-message{message=<red>Sorry, you lost!</red>}
- play-sound{sound=block.anvil.place;pitch=0;volume=1}
on-draw:
- send-message{message=<yellow>It's a draw!</yellow>}
- play-sound{sound=block.beacon.deactivate;pitch=0;volume=1}