中文说明 | User Guide | 中文使用指南
GameVoting is the lobby voting plugin for the minigames network. It manages voting, readiness, game selection, scheduler-backed server lifecycle, queued player transfers, vote history, holograms, and parties.
The current runtime uses SchedulerBridge for every server operation and PostgreSQL as its only persistence backend.
- GameVoting obtains the
ServerSchedulerservice registered by the Paper SchedulerBridge plugin. - Scheduler reads each
gamevotingentry fromservers/*.jsonand passes the ordered catalog through SchedulerBridge. - When voting ends, GameVoting launches the winning
server-idwhile players enter the ready phase. - The child server bridge reports startup and heartbeats to the scheduler. GameVoting polls until the instance state is
READY. - The SchedulerBridge Velocity plugin registers every ready child server at the scheduler-assigned address.
- GameVoting queues the selected player UUIDs for transfer. Velocity executes each connection request and reports the result.
- Failed transfers remain queued and are retried by the scheduler. The deployment default is 30 seconds.
- A child Bridge resets its idle timer whenever a player joins and asks the scheduler to stop the instance only after five continuous empty minutes.
GameVoting never chooses a child server port and never edits Velocity's server list directly.
- Multi-stage voting with lobby-ready, voting, and post-vote ready phases
- Scheduler-backed launch, status lookup, listing, stop, and transfer operations
- Exact client-version or client-version-range checks before readying
- Player-count filtering with
min_playerandmax_player - PostgreSQL vote history with UUID, timestamp, and JSONB vote details
- Optional DecentHolograms displays
- Configurable language files, voting items, BossBars, and ActionBars
- Lobby party management for up to 16 players
- Separate
/solocatalog with single-caller shared joins and frozen player-world parties - Optional GameVoting Velocity bridge for client-version detection, Scheduler-backed
/game, and permission-aware/help
- Paper 1.21.1 for the current lobby deployment
- Java 17 or newer; Java 21 is used by the current deployment
- Paper SchedulerBridge plugin on the lobby server
- SchedulerBridge plugin on Velocity and every managed child server
- Running
server-schedulerwith a valid bridge token - PostgreSQL database named
gamevoting - ViaVersion and the GameVoting Velocity bridge when client-version validation and its proxy commands are required
- DecentHolograms 2.8.6 or newer only when holograms are required
GameVoting disables itself if the Paper SchedulerBridge does not register ServerScheduler.
Publish the SchedulerBridge common API to the local Maven repository first:
cd ../scheduler-bridge
gradle :common:publishToMavenLocalBuild the Paper plugin:
cd ../GameVoting
mvn clean packageBuild the optional GameVoting Velocity bridge:
cd velocity-bridge
mvn clean packageArtifacts:
target/GameVoting-1.1.4.jarvelocity-bridge/target/gamevoting-velocity-bridge-1.0.0.jar
Install these plugins on the lobby Paper server:
- SchedulerBridge
- GameVoting
- DecentHolograms when holograms are enabled
Install these plugins on Velocity:
- SchedulerBridge Velocity plugin
- ViaVersion
- GameVoting Velocity bridge when version validation,
/game, and the GameVoting/helpoutput are required
Start the lobby once, then configure:
plugins/GameVoting/config.ymlplugins/GameVoting/lang/*.ymlplugins/GameVoting/holograms.yml
In the managed deployment, scheduler file rendering supplies the PostgreSQL connection values from the scheduler's central configuration.
debug: false
game-config-mode: "scheduler"
language: "en-US"
spawnpoint:
enable: false
x: 0
y: 64
z: 0
database:
enabled: true
host: "127.0.0.1"
port: 5432
database: "gamevoting"
username: "minigames"
password: "replace-me"
holograms:
locations: []PostgreSQL is the only supported persistence backend. The plugin creates the vote_history table and its indexes automatically. Setting database.enabled to false disables history and /vote session list while leaving live voting available.
The managed deployment enables game-config-mode: "scheduler". In this mode GameVoting never creates or reads games.yml. Every votable server owns a gamevoting object in servers/<server-id>.json:
{
"gamevoting": {
"order": 10,
"id": "GScard",
"name": "&b&lGSkard",
"description": [
"&7Defeat opponents with cards!"
],
"material": "GOLDEN_CARROT",
"custom_model_data": 0,
"min_version": "1.21.11",
"max_version": "26.2",
"min_players": 4,
"max_players": 50
}
}The Scheduler derives server-id from the JSON filename, validates the catalog, and passes it through SchedulerBridge to GameVoting. order controls menu order. Both BedWars servers run a strict 1.21.11 core and accept clients from 1.21.11 through 26.2.
The Velocity bridge also reads this catalog from the Scheduler at startup. /game <game-id> therefore displays every voting and Solo definition from servers/*.json, including its description, rules, aliases, supported client versions, player range, and game type. The managed Velocity config.yml keeps only command help; game content is not duplicated there.
Set solo to true to remove a definition from voting and expose it only through /solo. Solo definitions also provide solo_mode (shared or player_world), solo_startup (always or on_demand), solo_max_players, and solo_retention_days. Definitions with solo: false remain exclusive to voting and the normal game list.
shared starts or joins one scheduler-managed shared server and submits only the caller. It never captures or freezes a party. Clicking a player_world game first queries Scheduler for an existing allocation. Existing members immediately reopen their saved world. A player without a saved world enters a creation menu, may create alone or invite exactly one online lobby player, and can create a duo world only after that player accepts the clickable chat request. The accepted one- or two-player roster is frozen at creation and can be replaced only after /solo destroy <game-id> removes the saved world.
The GameVoting Velocity bridge requires ViaVersion and reads ViaVersion's original client protocol and version name before consulting Velocity's protocol value. Velocity is used only when ViaVersion has no player protocol. While the proxy bridge is installed, a lobby cache miss is reported as undetected and triggers a refresh instead of treating Paper's backend protocol as the client version.
GameVoting checks scheduler state once per second. As soon as the target enters READY, it queues the captured players without a fixed delay. Velocity holds those transfers until ViaVersion has detected the backend protocol, then connects the players immediately.
Stopping or replacing the pending target cancels its readiness poll, so callbacks from an older launch cannot transfer players later.
Player-facing commands:
/voteopens the voting menu during an active vote./vote start [minutes]starts a vote immediately. The default is one minute; values such as0.5and0.5minare accepted./vote readymarks the player ready after client-version validation./vote gamestartlets the vote starter continue from the ready phase./vote join [game-id]queues a transfer to the current or selected ready server./vote session list [page]shows stored voting sessions./soloopens the solo-only catalog./solo start <game-id>opens an existing player world or starts the creation flow; shared games launch immediately./solo destroy <game-id>destroys the caller'splayer_worldallocation so it can be recreated with a new frozen list.
Players also receive a fixed Glowstone Dust item in hotbar slot 6. It cannot be moved or dropped, and right-clicking it opens the same Solo catalog as /solo.
Administrative commands:
/vote stop/vote forcestart <game-id>/vote stopgame <service-id>stops one active Scheduler service; tab completion only lists online IDs such asBackstabbed-1./vote gamelist/vote session stop/vote reload/vote holograms create/vote holograms list/vote holograms remove <id>/vote lock <player>/vote unlock <player>
See the User Guide for permissions, all current scheduler IDs, transfer behavior, Velocity responsibilities, and troubleshooting.
Licensed under the MIT License.