Plugin
The code the server calls when a plugin starts, when the world is ready and when the plugin stops.
In Rust a plugin is a type that implements Plugin and is named in the voxelmon_plugin! macro. In Java it is a class that extends VoxelmonPlugin and is named in plugin.toml. The server creates it by calling enable, which is where the plugin listens for events and registers commands and tasks. Writing a plugin covers the manifest.
Your plugin implements this.
Methods
| Method | Description |
|---|---|
fn enable(server: &Server) -> Selfpublic void enable(Server server) | Called once loaded. Listen for events, register commands and tasks. |
fn world_ready(&mut self)public void worldReady() | Called once the world has loaded and players may join. |
fn disable(&mut self)public void disable() | Called when the server stops or the plugin is reloaded: save what it keeps. |