Concepts
Guarantees
On this page
No plugins, vanilla
With no plugin hooking anything, every hook point calls the game's own step directly. Nothing is converted, allocated or locked. A server running only the game's own rules (which are themselves plugins, but listening ones) pays one atomic read per hook point, packets included.
Every hook point has a vanilla_ test. It shows that a plugin hooked in all three modes
that answers Pass leaves the outcome exactly as it is with no plugin, on both the Rust and the
Wasm path.
A plugin cannot break the default path
| If a plugin… | then the server… |
|---|---|
| answers with a value of the wrong shape | logs it and keeps the value it would have replaced |
| panics (Rust) | unloads the plugin, and treats the call as Pass |
| traps or runs out of fuel (Wasm) | unloads the plugin, and treats the call as Pass |
returns "replaced" without emitting a value (Wasm) | treats it as Pass and logs it |
| makes host calls that hook again, more than 8 deep | stops the chain, and the game's own step runs |
| hands over more than 4 MiB (Wasm) | cuts it off; a cut value is not valid JSON, so it is refused |
Order is deterministic
Plugins are sorted by priority, and stably by load order within a priority. The same plugins loaded in the same order always compose the same way.
What a plugin can do
A plugin is trusted with the step it hooks. An override on command.op can make anybody an
operator, and an override on a clientbound packet can send the client anything. Install
plugins the way you would install server software.
From docs/api/concepts/guarantees.md in the RustMC repository at bbd81209ad.