Configuration
On this page(12)
SnFourInLine ships config.yml, one language file under lang/, three menu layouts under guis/ and the 3D board design under scenes/. New keys are auto-merged on boot; your values and comments are preserved.
config.yml
General
| Key | Default | Description |
|---|---|---|
lang | en | Language code. Loads lang/messages_<code>.yml, falling back to en. |
update-configs | true | Auto-merge new keys into the managed files on boot. false freezes them. |
debug.enabled | false | Runtime debug output. Also toggleable live with /fourinline debug. |
debug.level | DEBUG | OFF, INFO, DEBUG or TRACE. |
debug.categories | [] | Category filter; empty lets everything through. |
command.aliases | [fil, connect4, c4, 4enlinea, 4l] | Aliases of /fourinline, re-read on reload. |
Database
| Key | Default | Description |
|---|---|---|
database.type | sqlite | sqlite or mysql. SQLite needs nothing else. |
database.host | localhost | MySQL only. |
database.port | 3306 | MySQL only. |
database.database | snfourinline | MySQL only. |
database.username | root | MySQL only. |
database.password | "" | MySQL only. |
Presentation and game
| Key | Default | Description |
|---|---|---|
presentation.main | gui | Bare /fourinline: gui opens the lobby, chat prints the help. |
game.turn-timeout | 30 | Seconds a player has to move before auto-surrendering (minimum 5). |
game.turn-warning-threshold | 5 | Seconds left at which one warning is sent. 0, or turn-timeout and above, sends none. |
game.falling-animation-interval | 3 | Ticks between two steps of the falling piece. |
game.end-close-delay | 60 | Ticks the board stays open after a game ends. |
game.win-highlight-delay | 40 | Extra ticks when there is a winning line to show. |
3D board
Players on a Java 1.20.5+ client play on a board of display entities in front of them. Older clients, Bedrock players and anyone who runs /fourinline view menu keep the menu board.
| Key | Default | Description |
|---|---|---|
board-3d.enabled | true | Master switch. false sends every player to the menu board. |
board-3d.min-protocol | 766 | Lowest client protocol shown the 3D board. 766 is 1.20.5. |
board-3d.default-view | 3d | View of a player who never ran /fourinline view: 3d or menu. |
board-3d.asset | board.json | Board design under scenes/. Copied from the jar when missing. |
board-3d.distance | 4.0 | Blocks between the player and the board when it appears (2.5 to 12). |
board-3d.scale | 0.8 | Size of the whole board (0.3 to 3). 1.0 is about 4 blocks tall. |
board-3d.require-free-space | true | Lift the board to clear solid blocks, and use the menu board when it still does not fit. |
board-3d.hover-interval | 2 | Ticks between two checks of where the player on turn is aiming. |
board-3d.max-reach | 12.0 | Farthest a player can aim at and click the board from, in blocks. |
board-3d.spectator-leave-distance | 24.0 | Blocks a spectator can walk away before they stop watching. 0 never. |
board-3d.view-range | 1.0 | View range of the board's entities. 1.0 is about 64 blocks. |
board-3d.text-scale | 1.0 | Size of every text of the board. |
board-3d.text-background | #64000000 | Background of the texts, as #AARRGGBB. |
board-3d.button-background | #B4501414 | Background of the action button, as #AARRGGBB. |
board-3d.surrender-confirm-seconds | 3 | Window of the confirming second click of the surrender button. |
board-3d.appear-ticks | 10 | Ticks the board takes to grow in and fold away. 0 for none. |
board-3d.glow.player1 | #FF4040 | Glow of seat 1's hover chip and head. |
board-3d.glow.player2 | #FFD21F | Glow of seat 2's hover chip and head. |
board-3d.glow.winner | #55FF55 | Glow of the winning line. |
board-3d.win-particle | END_ROD | Particle around the winning chips. none disables it. |
A left click works from anywhere within max-reach. A right click works from about three blocks of the board, which is where a player stands when it appears with the default values.
Invites, lobby and leaderboard
| Key | Default | Description |
|---|---|---|
invites.expire-seconds | 60 | Lifetime of a pending invite (minimum 5). Expiry is silent. |
lobby.refresh-interval | 20 | Ticks between two in-place lobby refreshes. 0 or less disables; positive values are floored at 5. |
leaderboard.refresh-interval | 60 | Seconds between two refreshes of the cached top ten. |
Restrictions and broadcasts
| Key | Default | Description |
|---|---|---|
restrictions.worlds | [] | Worlds where the plugin is refused (exact, case-sensitive names). |
broadcasts.public-game-created | true | Announce a new public listing server-wide. |
broadcasts.game-won | true | Announce a won game server-wide. |
Sounds
The format is "SOUND_ID [volume] [pitch]", or none to disable one.
| Key | Default | Played |
|---|---|---|
sounds.piece-place | BLOCK_STONE_PLACE 1.0 1.2 | To every viewer when a piece lands. |
sounds.piece-fall | BLOCK_NOTE_BLOCK_HAT 0.5 1.5 | To every viewer on each step of the falling animation. |
sounds.game-win | ENTITY_PLAYER_LEVELUP 1.0 1.0 | To the winner. |
sounds.game-lose | ENTITY_VILLAGER_NO 1.0 0.8 | To the loser. |
sounds.surrender | ENTITY_VILLAGER_HURT 1.0 1.0 | To a player who surrenders (button, timeout or disconnect). |
Every timing applies on /fourinline reload, including the three repeating tasks: leaderboard refresh, invite expiry sweep and lobby refresh.
Currencies
The currencies: block is yours: it is marked extensible, so entries you add are never pruned and entries you delete stay deleted. One entry per currency players may bet in, keyed by the id they type on the command line:
currencies:
coins:
display-name: "&#FFD700Coins"
give-command: "eco give {player} {amount}"
take-command: "eco take {player} {amount}"
balance-placeholder: "%vault_eco_balance%"
decimals: 2
confirm-ticks: 60balance-placeholderis a PlaceholderAPI token (%...%) whose value is the player's balance as a number. Color codes and a currency symbol around it are stripped, and1,234.5,3.0E7or10.5kall read correctly.decimalsis how finely the currency counts:2for money,0for a points economy or a placeholder that answers whole numbers (such as%vault_eco_balance_fixed%). A stake may not be finer than this, because a fractional charge could not be verified against a whole-number balance.give-commandandtake-commandare dispatched from the console.{player}and{amount}are the only tokens; the amount is always plain decimal, never scientific notation. After a take the balance is read again and the stake only counts once it is seen to drop. A take the economy refuses (a minimum-balance rule, a command that only prints its usage) never starts a game whose stake nobody paid.confirm-ticks(default60, at most200) is how long the balance is watched for a take or a payout to show up. An economy that applies commands at once is confirmed on the first read and never waits. A proxy economy (one that forwards the command to BungeeCord or Velocity, such as SnCredits) moves the balance a round trip later and needs this wait; the bet starts as soon as the charge shows up. A take not seen within it is refused and logged.0demands the move in the same tick.display-nameis shown in messages and menus and may itself contain colors. A PlaceholderAPI token inside it resolves in chat messages, not inside menu items.- A currency is only offered for new bets when all three fields are set. A half-filled entry is reported at boot and on
/fourinline reload, and so is an emptycurrencies:block.
lang/messages_en.yml
Every line the plugin sends, a board-3d: block with the texts drawn on the 3D board, plus a status: block with the short state words spliced into the menus and into %snfourinline_playing%. Restyle any value freely; your edits survive updates. Colors accept &, &#RRGGBB hex, MiniMessage, and the [center], [rgb] and [small] tags.
guis/board.yml, guis/lobby.yml, guis/leaderboard.yml
The three menus. The layout mask, the materials, the names, the lore and which cell carries which click action are all yours. The code reads the cells from the mask, so moving the sidebar or repositioning the 42 board cells works. The grid itself is always 7 columns by 6 rows.
One rule when restyling player heads: the skull-owner lines bind from a {curly} placeholder (for example {player_uuid}), never a %percent% one. The percent form is claimed by PlaceholderAPI and resolves against whoever is looking at the menu, which paints the viewer's own skin on every head. Keep the braces and each head shows the right player.
scenes/board.json
The design of the 3D board: the frame, the two chips, the landing ghosts and where the texts stand. It is a display-scene asset in the same format SnHolograms plays. Replace the file and run /fourinline reload to restyle the board; delete it to get the shipped board back. A file that cannot be used turns the 3D board off with one console warning, and every player gets the menu board until it is fixed.