FeatherMC API
The FeatherMC API is a small library, io.github.1chenyip:feather-api, that adds the parts of the server that are unique to FeatherMC: reading feather.yml and reacting to FeatherMC’s built-in features. It is not a copy of the Paper API. It sits on top of it.
FeatherMC keeps the io.papermc.paper and org.bukkit packages, so every Paper, Spigot and Bukkit plugin runs on it unchanged. A plugin that only uses those classes needs nothing from this page.
What is in it
Section titled “What is in it”| Type | What it does |
|---|---|
dev.feathermc.feather.Feather | Static entry point: isAvailable(), brandName(), version(), config(). |
dev.feathermc.feather.FeatherPlugin | Base class for plugins that only run on FeatherMC, or on both FeatherMC and Paper. See Feather-only plugins. |
dev.feathermc.feather.FeatherSupport | Static checks: isFeather(), serverType(), serverVersion() and requireFeather(plugin). Works on Paper too. |
dev.feathermc.feather.FeatherServer | The FeatherMC-specific server accessor behind Feather. Implemented by FeatherMC, not by plugins. |
dev.feathermc.feather.config.FeatherConfigView | A read-only view of feather.yml: the anti-lag-machine guard, the anti-cheat check and whether Sentry is on. |
dev.feathermc.feather.event.TntMassDetonationEvent | Cancellable. Fires before the TNT guard removes a cluster. |
dev.feathermc.feather.event.AntiCheatFlagEvent | Cancellable, and its action can be changed. Fires when the built-in anti-cheat flags a player. |
dev.feathermc.feather.text.AlwaysFormat | Turns legacy and/or MiniMessage text (colors, gradients, \n) into a component that renders anywhere. See Always format. |
Everything else a plugin needs, such as blocks, entities, commands, the scheduler and Adventure, comes from the Paper API.
Writing plugins for FeatherMC
Section titled “Writing plugins for FeatherMC”These docs are about plugins built for FeatherMC. Extend FeatherPlugin and the plugin runs on FeatherMC and disables itself with a clear message anywhere else. See Feather-only plugins.
public final class MyPlugin extends FeatherPlugin { @Override protected void onFeatherEnable() { if (Feather.config().antiLagMachine().enabled()) { // FeatherMC-specific behaviour } }}A plugin can also support Paper as a secondary target. See Supporting Paper too.
- Using the API in a plugin
- Feather-only plugins
- Supporting Paper too
- Events
- Reading feather.yml
- Always format
Adapted from the PaperMC docs (CC BY-SA 4.0). About these docs.