Saltar al contenido principal

Minigame

The Minigame Extension is a complete minigame ecosystem built on a state-machine phase engine. Every game runs through a single GameContext — one store for ready players, teams and per-game state — with shared lobby, team, scoreboard, inventory and records services. All of it is configured through Typewriter entries.

Features

  • 26+ Game Modes — PvP (Sumo, Gladiator, Duels, KOTH, Paintball, OneInTheChamber), Parkour (Parkour, BlockParty, TNTRun, FloorIsLava), PvE (FallingBlocks, WaveSurvival, ZombieApocalypse, DefendTheCore, DodgeTheArrows), Strategy (CaptureTheFlag, Infection, Spleef, SheepHunt), Party (TPP, FreezeTag, HotPotato, DeACoudre, MusicalChairs), Reflex (Archery, Quake).
  • Phase Engine — Idle → Lobby → Countdown → Playing → Ending → Cleanup, as a state machine. Games plug custom phases (jump, rounds, waves) into the same engine.
  • Unified Game Context — One store per game instance: ready players, team assignments (with solo/duo/squad team modes), scores and live state. No parallel managers.
  • OmniGUI Menus — Game browser, arena selection, lobby, team selection, stats and post-game menus rendered through OmniGUI, opened by dedicated action entries.
  • Records & Quests — Persistent wins, scores, best-time and top-times artifacts, plus quest objectives (minigame_completion_objective) and facts to gate content on minigame progress.
  • Arena Regions — Arena definitions bind to Protection extension regions for boundaries and reset zones.

Entry Counts

The extension provides 27 configurable entries across 6 categories:

TypeCountEntries
Action9minigame_open_browser, minigame_open_arenas, minigame_open_stats, minigame_open_lobby, minigame_open_results, minigame_join, minigame_leave, minigame_forcestart, minigame_reset_records
Definition / Manifest6minigame_arena, minigame_lobby_menu, parkour_arena, deacoudre_arena, archery_arena
Artifact5minigame_scores, minigame_state, minigame_wins, minigame_best_time_artifact, minigame_top_times_artifact
Fact1minigame_completion_fact
Objective1minigame_completion_objective
Static3parkour_start_point, parkour_checkpoint, parkour_end_point
Total27

Quick Start

1. Define an Arena

Create a minigame_arena entry and configure its game type, spawn positions, team mode, and player limits. For parkour, use the dedicated parkour_arena with start points, checkpoints, and end points.

minigame_arena:
gameType: Spleef
lobbySpawn: <world,0,64,0>
gameSpawn: <world,0,50,0>
minPlayers: 2
maxPlayers: 8
teamMode: SOLO

2. Add Persistence Artifacts

Create artifact entries to store wins, scores, state, and best times. Reference them from the arena definition.

minigame_wins:
artifactId: my_wins
minigame_scores:
artifactId: my_scores
minigame_state:
artifactId: my_state

3. Open the Player Flow

Use action entries to let players browse, join, and interact with minigames. Trigger minigame_open_browser from an NPC or command to show all available games.

minigame_open_browser:
category: Spleef

4. Optional: Add Quest Integration

Create a minigame_completion_fact to track completions, then a minigame_completion_objective that triggers a reward when the player reaches the target count.

minigame_completion_objective:
fact: ref:my_completion_fact
amount: 10
onComplete: ref:give_reward_trigger

Placeholders

Placeholders resolved in minigame messages by MinigamePlaceholders. They are replaced when a message is sent from a game phase, not registered with PlaceholderAPI.

PlaceholderDescription
%arena%Arena display name.
%arena_id%Arena identifier.
%game_id%Current game identifier.
%phase%Current game phase.
%players%Number of players in the game.
%alive%Number of players still alive.
%max_players%Maximum players allowed by the arena.
%winner%Winner name, or Personne when there is none.
%player%Player name, in join and elimination messages.

Resolved per viewing player:

PlaceholderDescription
%score%The viewing player's score.
%alive_status%alive or eliminated for the viewing player.

Resolved for position-based messages (spawns, spectator points):

PlaceholderDescription
%pos_x%Position X, truncated to an integer.
%pos_y%Position Y, truncated to an integer.
%pos_z%Position Z, truncated to an integer.
%pos_world%World identifier of the position.

Permissions

PermissionDescription
minigame.startStart a minigame.

Dependencies

ExtensionRequiredUsage
OmniGUI (GuiAndDialogs)RequiredAll menus.
ProtectionRequiredArena regions.
Quest (official)RequiredCompletion objectives.