emsm.plugins.worlds

About

This plugin provides a user interface for the server wrapper. It handles the server files and their configuration parameters easily.

Download

You can find the latest version of this plugin in the EMSM GitHub repository.

Configuration

[worlds]
default_log_start = 0
default_log_limit = 10
open_console_delay = 1
send_command_timeout = 10

default_log_start

Is the first line of the log, that is printed. Can be overwritten by a command line argument.

default_log_limit

Is the default number of log lines, that is printed at once. This value can be overwritten by a command line argument too.

open_console_delay

Time between printing the WARNING and opening the console.

send_command_timeout

Maximum time waited for the response of the minecraft server, if the --verbose-send command is used.

Arguments

--address

Prints the binding (ip, port) of the world.

--configuration

Prints the section of the world in the worlds.conf.

--directory

Prints the directory path that contains the world.

--log

Prints the log.

--log-start LINE

The first line of the log that is printed. If ‘-10’ (with quotes!), the 10th last line will be the first line that is printed.

--log-limit LINES

Limits the number of printed lines.

--pid

Prints the PID of the screen session that runs the server.

--status

Prints the status of the world (online or offline).

--send CMD

Sends the command to the world.

Note

Escaping commands with spaces

If you want to send a command like say Hello players!, you have to escape it.

minecraft -W worlds --send 'say Hello players!'
--verbose-send CMD

Sends the command to the server and prints the echo in the logfiles.

--console

Opens the server console.

--start

Starts the world

--stop

Warning

Stopping the world not using the dedicated commands, will not call the event dispatcher and may cause bugs.

Stops the world

--force-stop

Like –stop, but kill the processes if the world is still online after the smooth stop.

--kill

Warning

Using this command can cause data loss.

Kills the process of the world.

--restart

Restarts the world. If the world is offline, the world will be started.

--force-restart

Like –restart, but forces the stop of the world if necessary.

--uninstall

Removes the world and its configuration.

Examples

# Start all worlds:
$ minecraft -W worlds --start

# Send a command to the server and print the console output:
$ minecraft -W worlds --verbose-send list
$ minecraft -W worlds --verbose-send '"say Use more TNT!"'

# Print the log of the world *foo*:
$ minecraft -w foo worlds --log
$ minecraft -w foo worlds --log-start '-20'
$ minecraft -w foo worlds --log-limit 5
$ minecraft -w foo worlds --log-start '-50' --log-limit 10

# Open the console of a running world
$ minecraft -w bar worlds --console

...