v1.0.2: premoves, spectating, focus mode, and check highlighting
Chess v1.0.2
Chess v1.0.2 adds premoves (queue moves while your opponent is thinking), a spectator system
with a [Watch Game] chat broadcast, a focus mode that declutters the dialog for viewers,
and red check highlighting on kings.
Added
- Premove queue: Players can queue moves while it is not their turn. Click a piece, click a
destination, and the move is queued. Multiple premoves stack — each opponent move fires the
oldest queued premove. All queued premoves display simultaneously with blue highlights and ghost
pieces on their destination squares. - Premove stacking by clicking ghost pieces: Clicking a ghost piece (a premove destination)
selects the piece at its simulated position, showing legal moves from where it would be after
prior premoves execute. The premove chain is simulated on-the-fly so multi-move premove
sequences show correct legal-move highlights at each step. - Cancel Premoves button: A dedicated
[Cancel Premoves]button replaces[Resign]when
premoves are queued. Clicking it clears the entire queue. - Check highlighting: Kings in check now render on a red background tile (4 piece-on-red
textures + 2 empty red tiles). TheHighlight.CHECKenum and codepointsU+EB06/EC06were
added to the glyph system. /chess watch <player>: Spectate any active game. Opens a read-only dialog board for the
watcher. The target player can be either player in the game.[Watch Game]broadcast: When a game starts, all online players (except the two players)
receive a clickable<green><bold>[Watch Game]</bold></green> Player1 vs Player2chat message.
Clicking it suggests/chess watch <white>.- Focus mode: A
[Focus]/[Unfocus]toggle in the dialog controls hides the player names
line, spectating label, and captured-piece lists. Viewers see only[Flip]and[Focus]in the
controls line (resign and draw are hidden). Players see all controls plus the focus toggle.
Changed
- Legal-move highlights use premove geometry when off-turn: When a piece is selected on the
opponent's turn, legal-move highlights now usePremoveMoveCalculator(chessground-style
geometric validation) instead of the engine's strict legal-move generator. This shows relaxed
pawn diagonals, sliding-through-opponent paths, and other premove-valid squares as green
highlights. - Highlight priority reordered:
SELECTEDandLEGALnow take priority overPREMOVEwhen a
piece is selected, so legal-move highlights are visible even when premove blue tiles overlap. - Premove validation is geometric-only: Pawn diagonals are always allowed (no target-piece
check), sliding pieces are only blocked by own pieces, and no check/castling/en-passant
validation is performed at queue time. Strict validation happens at play time via the engine. - Removed "Your selected piece cannot move to that square" error message: Failed move
attempts no longer show the info-line error text. - Intermediate premove squares lose ghost, keep blue highlight: When the same piece is premoved
multiple times in a chain, intermediate waypoints show the blue empty tile but no ghost piece.
Only the final destination shows the ghost.
Resource Pack
- Added 24 premove piece textures (12 pieces x 2 light/dark variants) at codepoints
U+E900..E917. - Added 2 empty premove tiles at
U+E018/19. - Added 4 check king textures (white/black x light/dark) at
U+EB06/EC06andU+EB0C/EC0C. - Added 2 empty check tiles at
U+E01A/1B. - Updated
board.jsonwith premove and check providers for all piece types.
Commands
/chess duel <player> <time>
/chess accept <player>
/chess decline <player>
/chess watch <player>
/chess open
/chess help
Verification
- All 8 premoves tests pass: premove queue, 8-pawn premove storm, scholar's mate premove,
premove play-through, capture premove, discard when blocked, and same-piece stacking. - DialogContentGrowth test passes.
gradle clean buildsucceeds with zero warnings.- Tested premove stacking with same-piece and different-piece sequences.
- Tested focus mode toggle for both players and spectators.
- Tested
/chess watchcommand and[Watch Game]broadcast.
Upgrade Note
Replace the previous Chess.jar and fully restart the server. Chess will overwrite
plugins/Chess/resourcepack.zip with the updated bundled pack during startup.
If ResourcePackManager merges the Chess pack, allow it to rebuild and redistribute the combined
pack. If the resource pack is hosted or merged manually, replace that external copy with the new
plugins/Chess/resourcepack.zip; updating only the plugin JAR will leave clients on the old board
textures. Players may need to reconnect after the updated pack is available.
Chess v1.0.2 continues to target Paper 1.21.11, Java 21, and compatible Folia servers.
