Config Paper
plugins/MythicProxy/config.yml is the MythicProxy config of a backend, and every backend has its own. The plugin creates it with these defaults on the first start and reads it only when the server starts, so restart the server after you change it. Edit it while the server is stopped: the plugin saves the file when it learns a new proxy address, which overwrites changes made while it runs.
server-name: ""
proxies: []
secret: ""
queue-size: 1000
lifecycle-timeout-seconds: 30
events:
network-join: []
server-switch: []
network-quit: []
signal: {}
Options
| Option | Description | Default |
|---|---|---|
server-name |
This backend's name in velocity.toml. Leave it empty to let the proxy find it, see Server Names. |
"" |
proxies |
The proxies to connect to, as host:port. Usually filled in automatically, see How Backends Find the Proxy. |
[] |
secret |
The shared secret. Leave it empty to use the Velocity forwarding secret, see Secret. | "" |
queue-size |
How many messages the backend keeps while no proxy is connected, see When a Proxy Is Down. | 1000 |
lifecycle-timeout-seconds |
How many seconds a join or switch may wait for the player's data before it is dropped, see Missed Events. | 30 |
events |
Skills to cast when players join, switch or leave, or when a signal arrives, see Events. | empty lists |
Write proxies and every list under events as a YAML list, even with one entry. A single value, such as network-join: NetworkWelcome, is read as an empty list.
Events
Each list holds the names of MythicMobs skills, cast in the order listed. Names are case-sensitive, and each skill must exist on every backend that casts it. The lists work without any mob or item.
| List | Cast when | Caster |
|---|---|---|
network-join |
a player joins the network on this backend | the player |
server-switch |
a player moves to this backend from another one | the player |
network-quit |
a player leaves the network from this backend | a stand-in, see below |
signal.<name> |
a signal called <name> reaches this backend, see Signals |
the player who receives it |
The skills get the same skill variables as the matching trigger, such as <skill.var.player-name>, see Skill Variables.
- Targets. These skills have no trigger entity and no targets, so
@Triggerselects nothing. Give each line a targeter, for example@Selffor the player. A line without one runs only mechanics that need no target, such ascommand. network-quit. The player has already left, so the caster is a stand-in namedServerat 0, 0, 0 in the first world of the backend, and@Selfselects that stand-in. Use the skill variables, or a targeter that does not depend on the caster, such as@PlayersOnServer.- Skill names. Skills are looked up each time an event happens, so a changed skill applies after
/mm reload. A name the backend does not know logs a warning (see Troubleshooting), and a skill whose own conditions fail is skipped without a message.
Signals
A list under signal runs when a signal with that name arrives. For a signal sent to all or to server:NAME, its skills are cast once on every online player of the receiving backend. For a signal sent to a player, they are cast on that player. Who receives a signal is explained under Target Attribute.
- Signal names are not case-sensitive:
bosskilledandBossKilledare the same signal, so list each name once. - A name cannot contain a dot. The config reads a dot as a nested section, so the list is never found.
Example
In plugins/MythicProxy/config.yml on every backend:
events:
network-join:
- NetworkWelcome
signal:
bosskilled:
- BossKilledNotice
In a MythicMobs skill file on every backend:
NetworkWelcome:
Skills:
- message{m="Welcome to the network, <skill.var.player-name>. You are on <skill.var.server>."} @Self
BossKilledNotice:
Skills:
- message{m="<skill.var.signal-payload> was killed on <skill.var.origin-server>."} @Self
A networkSignal{signal=BossKilled;target=all;payload="Network Boss"} line on any backend then casts BossKilledNotice on every online player of every backend.