Command Reference

Command Reference

Overview

  • All commands are subcommands of the /chess command.
  • Commands can all be abbreviated to the shortest unique form, e.g. /chess c g is equivalent to /chess create game.
  • As of v2.3.0, tab completion is supported (when using the client - not from the console), e.g. /chess c<Tab> will auto-expand to /chess create.

Admin commands

If you're using a permissions plugin, you need to be an op, or have the chesscraft.admin and/or chesscraft.commands.command permission nodes to run these commands. If you're not using a permissions plugin, you need to be an op.

Creating Boards

/chess create board board-name [-style style-name] [-pstyle style-name]
Create a new chessboard. board-name is the unique identifier for the board.

If you want to use a non-default board style, also specify -style style-name. E.g. /chess create board2 -style open

If you want to use a non-default piece style (i.e. a style other than what the board definition file specifies), you can also specify -pstyle style-name, where style-name is the name of a chess set definition file. E.g. /chess create board3 -style open -pstyle twist

As of v0.4, the board orientation (north, east, south, west) depends on where the player is facing when the board is created (in earlier versions, the board was always oriented so that White faced north).

Take great care with this command in developed areas. It is possible to destroy a lot of work with a carelessly placed board. Experiment in safe areas (unused wilderness, high in the air, out at sea, deep underground...) first.

Deleting Boards

/chess delete board board-name
Delete a chessboard. The board must not have a game on it (you can use /chess delete game first if necessary). The entire board (including frame and enclosure) will be replaced by air, or if you have WorldEdit installed (and also had it installed when the board was created) the original terrain will be restored.

Deleting Games

/chess delete game game-name
Deletes a game, effectively abandoning it. Only admins can do this - if you don't have admin privileges and want to delete a game you created or are playing in, you can end it by either resigning or agreeing a draw with the other player.

Note: there is one condition where you may use /chess delete game without having the chesscraft.admin privilege: if the game was created by you and has not yet started.

Redrawing Boards

/chess redraw [board-name] [-all]
With no arguments, forces a repaint of the board you are currently standing on. With a board name argument, force a redraw of just that board. With the '-all' option, force a redraw of all boards. This might be useful if blocks have been damaged somehow; the default config prevents blocks being destroyed normally but does not (and cannot) protect against editing by plugins such as WorldEdit.

Setting/Getting Configuration Items

/chess setcfg key value
/chess getcfg [key]
Sets or gets a configuration item. See Configuration for a full list of configuration keys.

Saving Game State

/chess save
Saves all game state to disk immediately. If the autosave configuration item is true (see Configuration) then this should not be needed under normal circumstances since game state will then be saved whenever it changes.

Reloading Game State

/chess reload {ai|config|persist}
Reload AI definitions, configuration or saved game state, respectively. This might be useful if you need to manually modify the game state but take extreme care: incorrect modification could lead to loss of data.

Changing Board Styles

/chess board set <attribute> <value> [<attribute> <value> ...]
Change one or more board style parameters on the fly (i.e. after a board has been created). This can be done even when a game is in progress, but must be done by a player standing on the board in question. See Board Styles for full details.

Saving Board Styles

/chess board save [<new-style>]
Saves a new board style after making changes with /chess board set .... The new style name can be omitted, in which case the board's current style will be overwritten. See Board Styles for full details.

Setting the Teleport-out Destination

/chess tp -set [<board-name>]
By default, when a player clicks the Teleport Out control panel button, or use the /chess tp command on a board, the game will attempt to teleport the player to a safe location just outside the northeast corner of the board.

As of v2.2.0, it is possible to set a custom teleport-out destination, both a global default, and per-board. To set the global (default) destination, go to the desired location, and type /chess tp -set. Now players will be sent to that location whenever they teleport out of a board. To set a destination for a specific board, use /chess tp -set <board-name>. Now players will be sent to that location whenever they teleport out of that board. Per-board locations override the global default.

Teleporting to a Board

/chess tp board-name -b
With the -b option, you will be teleported to the board named board-name. (Without -b, teleporting is done by game name - see Teleporting to/from Games below).

Player commands

If you're using a permissions plugin, you need to have either chesscraft.basic or chesscraft.commands.command to run these commands. If you're not using any permissions plugin, all users will be able to use these commands.

Creating Games

/chess create game [game-name] [board-name] [-black]
Create a new game. One or both of the game name and board name can be omitted. If the board name is omitted, ChessCraft will use the first free board it finds to host your game. You can choose to play as Black with the -black option. If the game name is omitted, ChessCraft will generate a unique game name based on your player name and a number, e.g. desht-1, desht-2, etc.

Showing Board Information

/chess list board [board-name]
Lists all chessboards. With board-name, shows detailed information for the named board.

The Board Info on each board's control panel will also show detailed information for that board.

Showing Game Information

/chess list game [game-name]
Lists all games. With game-name, shows detailed information for the named game.

The Game Info button on each board's control panel will also show detailed information for that game.

Setting the Active Game

/chess game [game-name]
Sets or displays the current game for a player.

Many ChessCraft commands use the concept of a 'current game'. Since ChessCraft allows players to have more than one game in progress at a time, it needs a way of tracking which game is the player's current game. The current game is set when you create, join, or teleport to a game, but to change it at any time you can use /chess game game-name.

/chess game with no game-name just displays the player's current game.

Setting the Stake for a Game

/chess stake
(Only available if you have a supported Economy plugin)

Set the stake for the current game. This can only be done after you have created the game, and before you invite the other player.

There is also a Stake button on each board's control panel which can be used to increase or decrease the game's stake. Left-click to increase it, right-click to decrease it. Holding down Shift (sneaking) will increase/decrease the stake by a smaller amount; the increments are controlled by the stake.smallIncrement and stake.largeIncrement configuration items.

Inviting Players

/chess invite [player-name]
This command invites a player to your current game. If you omit player-name, the invitation is considered open - a message is broadcast to the server informing everyone that they can join the game.

There are also Invite Player and Invite ANYONE buttons on each board's control panel. Invite Player just displays a reminder of the command syntax for inviting a player.

Joining an Existing Game

/chess join [game-name]
This command joins a game that someone has invited you to. If the invitation was for you only, you can type just /chess join, omitting the game name (this is because ChessCraft has already made the game your active game - see /chess game above). If the invitation was open (i.e. to the entire server), you will need to include the game name that was announced - in this case the game will become your current game when you join.

Starting a Game

/chess start
This command starts your current game, once it has two players. Once this is done, pieces can be moved, and the game state will be shown as RUNNING by /chess list game.

You can also use the Start Game button on each board's control panel.

By default, games are auto-started once there are two players - see the autostart Configuration setting. Manually starting a game with only one player will auto-invite an AI as the second player.

Making a Move

/chess move from to
Make a chess move in your current game. from and to are board squares in standard algebraic notation (i.e. a1 is White's left-hand Rook square). The space between from and to can be omitted, e.g. /chess move e2 e4 and /chess move e2e4 are both accepted.

You can also move by looking at one of your pieces while holding nothing, and then left-clicking to wave at it. Once it's selected for movement, look at a board square or opposing piece and left-click again to move the piece. To cancel a move, look at the piece you selected and left-click. (You don't need to be right beside the piece you are moving - this can be done at a distance).

Undoing the Last Move

/chess undo
Undo the last move you made in your current game (ChessCraft 1.4+ required). Restrictions apply: if playing against a human opponent, they will be prompted to accept or decline your undo request. If playing against an AI opponent, your request will be accepted if and only if there is no stake for this game.

You can also use the Undo Last Move button on each board's control panel. Additionally, the Yes and No buttons will light up if a Yes/No response is expected of you.

Offering Draws

/chess offer draw
Offer a draw to the opposing player. That player will be prompted to accept or decline the offer by typing /chess yes or /chess no.

You can also use the Offer Draw button on each board's control panel. Additionally, the Yes and No buttons will light up if a Yes/No response is expected of you.

Offering Side Swap

/chess offer swap
Offer to swap sides with the opposing player. That player will be prompted to accept or decline the offer by typing /chess yes or /chess no.

You can also use this if you've created the game and want to play Black; type /chess offer swap before inviting the other player.

Setting Pawn Promotion Preference

/chess promote piece-name
Set your pawn promotion preference for the current game. piece-name may be one of N, B, R, Q for Knight, Bishop, Rook & Queen respectively. Note that this applies to the current game only, not all your games.

The default promotion piece is a Queen.

There is also a Pawn Promotion button for each player on each board's control panel which displays the current promotion preference. Clicking this button will cycle through the four possible promotion pieces.

Resigning a Game

/chess resign
Resign your current game, ending it immediately.

You can also use the Resign button on each board's control panel.

Claiming Victory by Default

/chess win
Attempt to win the current game by default. This can only be done if your opponent has logged out of Minecraft for at least a certain number of seconds (default: 60, see the timeout_forfeit Configuration setting).

Teleporting to/from Games

/chess tp [game-name]
Teleport around all the chess games on the server.

With a game-name, teleports you to the named game.

With no game-name, teleports you back to your previous location. If you have no "previous location" and are standing on a chessboard (e.g. you just logged in), tries to teleport you to a safe spot outside the board you are on.

Note that if your boards are not enclosed (i.e. you're using a board style with enclosure set to air), this could be used by players as a free teleport around the world, which may or may not be desirable.

There is also a Teleport Out button on each board's control panel which will teleport you off the board as described above.

Teleporting can be disabled entirely by setting the teleporting Configuration setting to false.

Writing a PGN File

/chess archive
Write a PGN-format archive of the current game. The archive folder is plugins/ChessCraft/pgn under your Bukkit directory. The file name is derived from playername-date-N, where N is an integer to ensure the file name is unique.

Viewing the Leaderboard

/chess list top [<N>] [<view-type>] [-ai]
Display the top N scores in the leaderboard. If N is omitted, it defaults to 5. view-type may be "ladder" or "league" - if omitted, defaults to "ladder". If '-ai' is specified, AI players will be excluded from the list, and only human scores will be shown. See Leaderboard for more information.

Comments

Posts Quoted:
Reply
Clear All Quotes