<aside> 🗒️

Classic TNT Run. Players join into the lobby (empty inventory required) and join the alive team; once more than four are in, a countdown starts and teleports everyone to the arena. While the round is running, TNT under players is removed as they move. On death you leave the alive team and respawn as a spectator; last player remaining wins, then a short timer returns everyone to lobby.

</aside>

<aside> 🛠

How to set this up

Locations:
  lobby:
    world: world
    x: 0.0
    y: 0.0
    z: 0.0
    yaw: 0.0
    pitch: 0.0
  arena:
    world: world
    x: 0.0
    y: 0.0
    z: 0.0
    yaw: 0.0
    pitch: 0.0
Events:
  Player_Death:
    Commands:
      - 'remove-from-team {player}'
  Minigame_Leave:
    Commands:
      - 'send-public-message {player} &c{player} &7left the game.'
  Minigame_Join:
    Commands:
      - '{player} if {public:data:started} = 1 do send-private-message {player} &cThis minigame has already started.'
      - '{player} if {public:data:started} = 1 do cancel-event {player}'
      - '{player} if {used-inventory-slots} > 0 do send-private-message {player} &cYou must have an empty inventory to play this minigame.'
      - '{player} if {used-inventory-slots} > 0 do cancel-event {player}'
      - '{player} if {minigame-size} > 4 do set-public-timer {player} start 300'
      - 'teleport {player} lobby'
      - 'add-to-team {player} alive'
  Respawn:
    Commands:
      - 'set-gamemode {player} SPECTATOR'
  Constant_Scheduler:
    Commands:
      - '{player} if {public:timer:start} divides 100 do send-public-message {player} &eThe minigame starts in &c{math:divide:{public:timer:start}:100} &eseconds.'
      - '{player} if {public:timer:start} = 1 do set-public-timer {player} warmup 100'
      - '{player} if {public:timer:start} = 1 do set-public-data {player} started 1'
      - '{player} if {public:timer:start} = 1 do teleport {player} arena'
      - '{player} if {public:timer:end} divides 100 do send-public-message {player} &eYou will be teleported back to lobby in &c{math:divide:{public:timer:end}:100} &eseconds.'
      - '{player} if {public:timer:end} = 1 do teleport {player} lobby'
      - '{player} if {public:timer:end} = 1 do set-gamemode {player} SURVIVAL'
      - '{player} if {public:timer:end} = 1 do remove-from-minigame {player}'
  Per_Second_Scheduler:
    Commands:
      - '{player} if {team-size} = 1 do set-public-data {player} ended 1'
      - '{player} if {team-size} = 1 do send-public-message {player} &a{player} &7won the minigame!'
      - '{player} if {team-size} = 1 do set-public-timer {player} end 300'
      - '{player} if {team-size} = 1 do save-stats {player} wins +1'
  Server_Leave:
    Commands:
      - 'remove-from-minigame {player}'
  Movement:
    Commands:
      - '{player} if {public:data:started} = 1 do {player} if {public:data:ended} = 0 do {player} if {interacted-block:type} = tnt do remove-interacted-block {player}'