emsm.plugins.guard

About

Monitors selected worlds (–world, -w, -W) and reacts on issues.

Download

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

Configuration

Since EMSM version 3.2.2-beta, this plugin requires no more configuration. The command line arguments allow you to adjust the guard for each world.

Arguments

When invoked all worlds selected with the global EMSM commands -W or -w are checked.

--error-action {none, stop, restart}

Defines how the guard handles a world in trouble.

Note

Per default, all tests will be performed. If you don’t want to run all tests, you can pass the tests, which should be performed as command line arguments.

--test-status

Check if the world is online.

--test-log

Check if the logs contain an error.

--test-port

Check if the world is reachable.

--output-format {console, text}

Defines the output format.

text is suitable for sending the guard output via email.

--output-only-new-warnings

If an error with the world has been detected in the previous run, the warning for this world will be suppressed.

Cron

This plugin is made for cron (therefore it does not print much):

# m h dom mon dow user command
# Runs the guard every 5 minutes for all worlds
*/5 * *   *   *   root minecraft -W guard --output-only-new-warnings --output-format text

# Runs the guard every 5 minutes for the world *foo*.
*/5 * *   *   *   root minecraft -w foo guard --output-only-new-warnings --output-format text

Changelog

3.0.0-beta

  • Removed configuration options that were dedicated to enable the guard for selected worlds.
  • The new guard simply monitors all worlds selected with the -W or -w argument.

3.2.2-beta

  • removed configuration options
  • added port check again
  • added different output formats