Commands on events¶
Things that happen when things happen.
This is the glue an owner otherwise buys a scripting plugin for: give a starter book on first join, announce a death, put somebody back in survival when they change world, catch a fall into the void. One config block, a list of commands per event, placeholders for what is worth knowing.
event-commands:
first-join:
- "give {player} bread 8"
- "[player] kit starter"
death:
- "broadcast {player} was slain by {killer}"
world-change:
- "gamemode survival {player}"
void-fall:
- "spawn {player}"
Lines run as the console. A line starting with [player] runs as the player,
with their own permissions - so a line an owner writes cannot hand out more
than the player already has.
Events¶
| Event | Extra placeholders |
|---|---|
first-join, join, quit |
- |
kick |
{reason} |
death |
{killer} {cause} |
respawn |
- |
teleport |
{from-world} {to-world} {cause} |
world-change |
{from-world} {to-world} |
gamemode-change |
{gamemode} {from-gamemode} |
level-change |
{level} {from-level} |
bed-enter, bed-leave |
- |
elytra-start, elytra-end |
- |
void-fall |
- (fires once per fall, eight blocks below the world floor) |
Every event also has {player} {uuid} {world} {x} {y} {z}.
The void-fall check is only active when something is configured for it; a move handler is the hottest event there is, and paying for it to do nothing would be a poor trade.