Event System

Create scheduled or triggered events like treasure hunts, PvP tournaments, or holiday celebrations. Engage players with special activities.

Scheduled Events

Start events at specific times:

/cmd add start_event tellraw @a {"text":"Treasure Hunt Event Started!","color":"gold"} && function:event_setup
/cmd add event_check execute if score #event_timer event_time matches 0 run function:event_end

Player-Triggered Events

Events that start when enough players join:

/cmd add join_event scoreboard players add #event_players event_count 1 && tellraw @s {"text":"Joined event!","color":"green"} && execute if score #event_players event_count matches 5.. run function:start_pvp_event

Custom Syntax Events

// In syntax.json
{
  "event": {
    "pattern": "/event ",
    "description": "Manage server events"
  }
}

// In aliases.json
{
  "event_start": "scoreboard players set #event_active event_status 1 && tellraw @a {\"text\":\"Event started!\",\"color\":\"green\"} && function:event_start",
  "event_stop": "scoreboard players set #event_active event_status 0 && tellraw @a {\"text\":\"Event ended!\",\"color\":\"red\"} && function:event_cleanup",
  "event_join": "execute if score #event_active event_status matches 1 run tag @s add event_player && tellraw @s {\"text\":\"Joined the event!\",\"color\":\"green\"} || tellraw @s {\"text\":\"No active event!\",\"color\":\"red\"}"
}

Event Rewards

Automatic rewards for event participation:

/cmd add event_reward execute as @a[tag=event_player] run give @s diamond 1 && tellraw @s {"text":"Event reward!","color":"gold"} && tag @s remove event_player