The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

mcrcon - RCON interface for Minecraft servers

SYNOPSIS

mcrcon --pass=password [options] command

mcrcon --pass=password [options] --command='cmd1' ...

OPTIONS

--host=host        Hostname to connect to          [127.0.0.1]
                   --address, --addr, --hostname are aliases
--port=port        Port number                         [25575]
--password=pass    Password
--color_mode=mode  One of convert, strip, ignore     [convert]
--command=cmd      Command to run. May repeat.
                   --cmd is an alias
--stdin            Read from stdin, even if commands given
--echo             Echo the commands themselves to stdout
--tty              Force TTY behavior, even if not detected
-v|--version       Display version number and exit

Any remaining arguments on the commandline will be concatenated together and interpreted as a single command, as you might expect.

DESCRIPTION

mcrcon provides a commandline interface to interact with a Minecraft server using the RCON protocol. You may specify commands via commandline options, or via standard input. Additionally, when using stdin, and mcrcon is running from a TTY, you will have a console-like interface with readline support, command history, and help.

OPTION DETAILS

--host=<host>

The hostname or IP address of the Minecraft server.

--port=<port>

The TCP port number to connect to. Default is the usual RCON port number, 25575. This must match the port number defined in your Minecraft server's server.properties file:

rcon.port=25575
--password=<password>

The password required to connect to the Minecraft RCON. This is defined in your Minecraft server's server.properties file:

rcon.password=

Note that the password must not be blank. A blank password defined in server.properties means that RCON is disabled on your server.

color_mode=convert|strip|ignore

The color mode for command responses. Normally color codes are converted from the Minecraft escape sequences to ANSI, so they will display properly on a terminal. If you are filtering or otherwise processing the output, you may wish to set --color_mode=strip, to strip all color sequences entirely. Finally, you can set --color_mode=ignore to pass the Minecraft color sequences through unmodified.

--stdin

Even if a Minecraft command is given on the command line, read additional commands from standard input.

--echo

Echo commands themselves to standard output

--tty

Force TTY (terminal) behavior, even if a TTY is not detected.

-v | --version

Display version number and exit.

--help

Display usage summary and exit.