Plugins

Vanillite has its own plugin system. The server itself does not run Bukkit, Spigot or Paper plugins; an optional layer, vanillite-bukkit, can, and the server sets it up for you (see also the FAQ).

  • Native: plugins are compiled libraries, as fast as the server itself.
  • Stable ABI: the ABI is the binary contract between server and plugin. "Stable" means a plugin built for one Vanillite version keeps working with later ones. Every change to it is checked automatically; a breaking change needs a new major version. New functions are only added at the end, so older plugins are not affected (the contract is at version 1.12 today).
  • One Rust SDK (vanillite-plugin) makes writing plugins safe and simple. Any language that can export a C function can implement the ABI directly.
  • A crashing plugin is caught and named, so you know which plugin caused a problem. After a hard crash the server skips that plugin at the next start, so it comes back up.
  • Plugins can fill slots, that is, replace core systems. Today: the world generator.
  • Events cost nothing where no plugin listens: each place in the game that fires an event is one check.
  • Zero cost when absent: without plugins there is no download, no Java, no memory and no work.

Beta. A large part of the Spigot/Paper surface works; more events and server functions come step by step.

This chapter

For server admins

Page What it covers
Installing plugins Folders and files, native plugins and Spigot/Paper jars, offline setup, platforms, settings.
Managing plugins /plugins and /version, switching plugins off, reload, permissions, safe mode, pins, cost.
Plugin troubleshooting The log messages you may see, and what to do.
Spigot and Paper compatibility Which plugins run, what the layer implements, differences from Paper, known limits.

For plugin developers

Page What it covers
Plugin concepts The ABI and its stability, owners and threads, lifecycle, plugin.toml.
Your first plugin A Rust plugin from scratch, and the three examples in the repository.
Plugin API: events Every event, when it fires, and whether you can cancel it.
Plugin API: commands and permissions Command trees, arguments, Tab completion, permission nodes, late registration.
Plugin API: players, entities and worlds Players, entities, blocks, worlds, items and menus.
Plugin API: tasks, config and data Scheduling, config files, persistent data, logging.
Plugin API: packets Listen to, rewrite, send and feed in packets.
Plugin API: slots and hosted plugins World generator, populators, mob goals, services, hosting other plugins.
Bukkit layer for developers How the layer works, ProtocolLib, threads, reporting missing methods.

The short guide for admins who only want Java plugins running: Spigot and Paper plugins.

What plugins can do today

  • add commands (with Tab completion and Vanilla permission levels). Arguments can be entities, positions, rotations, identifiers, block states, items, texts, NBT, game modes, times and UUIDs; commands can also be run from command blocks and by entities. Commands can be added after the start as well: the server adds them at the end of the tick and sends every player the new command list;

  • react to events:

    • players: logging in (a plugin can refuse or let in a player the server refused), joining, leaving, moving, teleporting, chatting, running commands, using an item on a block or in the air, interacting with blocks and entities, picking up and dropping items, changing game mode, changing world, dying (change the death message, keep the inventory) and respawning, getting an advancement, fishing, shooting projectiles, toggling sneaking, sprinting or flying, being kicked, statistics, plugin messages, going to bed and getting up, getting a new respawn point;
    • entities: spawning (with the reason), taking damage, dying and dropping items, choosing a target, exploding, projectiles hitting, riding vehicles, taming, breeding, using a portal (a plugin may send it to another world), changing into another kind, sheep being dyed, totems of undying;
    • blocks and world: breaking and placing blocks, growing, forming, spreading and fading blocks, leaves decaying, water and lava flowing, burning and igniting, bone meal, trees and mushrooms growing, pistons, signs changing, dispensers, chunks loading and unloading, worlds loading and unloading, saving a world, weather changing, the time skipping, portals being created;
    • inventories: opening, clicking, dragging and closing menus, crafting, anvils, furnaces, hoppers moving items, enchanting and brewing.

    The full list is on Plugin API: events. Many events can be cancelled. A plugin can skip events another plugin already cancelled, stop listening again, and send its own events to other plugins;

  • listen to packets: see, cancel, rewrite and send the raw network messages between server and client, and feed a packet in as if the client sent it (Plugin API: packets). A packet type nobody listens to costs nothing. With listeners the server still builds a message once for all players who get it (see Chunks and networking);

  • run timed tasks, also on a background thread so slow work does not delay a tick;

  • decide permissions, and register permission nodes with a default;

  • show things to players: the header and footer of the tab list, a text above the hotbar, a title and subtitle, boss bars, sounds and particles; send players to another server (transfer) and talk to a client mod over plugin message channels;

  • build own menus: open a chest-like screen for a player and react to clicks;

  • use the Vanilla scoreboard and teams;

  • read and change a player and its items, effects, advancements and position, also across worlds;

  • spawn, find and remove entities, read and change their data and the data of block entities (NBT), attributes, targets, and move mobs with navigation;

  • give mobs own behaviour: goals run after the Vanilla goals, so mobs without such goals keep Vanilla's AI untouched;

  • save small values with a player or any other entity (persistent data) that survive restarts;

  • read and change blocks one at a time or a whole box in one call;

  • create, load and unload worlds while the server runs (flat, void, amplified, large biomes or the generator of a dimension, with a seed) and move players between worlds, like Multiverse on Paper. Worlds can also be declared in vanillite.toml (Extra worlds);

  • read server facts (time, weather, game rules, tick statistics, operator, whitelist and ban lists) and set the server list's MOTD;

  • share services with other plugins, and tell the server which plugins they host, so /plugins lists them too;

  • replace the world generator, or add populators that decorate chunks after the generator.

Spigot and Paper plugins (Beta)

Many servers depend on Java plugins for Bukkit, Spigot or Paper. For them there is the optional layer vanillite-bukkit. It is an ordinary native plugin that starts a Java virtual machine inside the server and runs the Bukkit/Paper API on top of the plugin system. Put the jars into plugins/ and start the server: the layer and a Java 25 runtime are downloaded on their own (Linux, Windows and macOS; tried on Linux and in the Docker image on x86_64, see Installing plugins). EssentialsX, LuckPerms and Vault run; WorldEdit and WorldGuard run in a local test; ProtocolLib's API is implemented but early. Details: Spigot and Paper compatibility. The layer's Java part is GPL-3.0; Vanillite stays Apache 2.0.

See also: Replaceable systems, Roadmap and status, FAQ.

Next: Installing plugins. Next chapter: Benchmarks: Vanillite vs Paper.