Module index
Every module, what it is for, and where its entry point lives.
Every module is reached the same way: a static class named after it, usually with an of(plugin)
handing back a view that belongs to your plugin.
Foundations#
| Module | Entry point | What it is for |
|---|---|---|
| Task | Tasks.of(plugin) | Scheduling that runs on Spigot, Paper and Folia from one call. |
| Config | Configs.define(plugin, name, type) | YAML files declared and read as Java records. |
| Text | Text.of(string) | Every player-facing string, into Adventure components. |
| Placeholders | Placeholders.group(plugin, prefix) | One registry for %placeholders%, with or without PlaceholderAPI. |
| Formats | Formats, Amounts | Numbers, money, percentages and dates a player reads — and amounts a player types. |
| Debug | Debug.of(plugin) | Coloured console output, with a server-wide switch. |
| Reloading | Reloads.of(plugin) | Named reload steps with contained failures, plus library-reload listeners. |
| Modules | PluginModules.of(plugin, switches) | Switchable parts of a plugin, each with its own files, listeners, actions, menus, commands and timers. |
| Metrics | Metrics.describe(plugin, details) | How a plugin's setup is described to stats.exylia.net. See Metrics. |
| Web editor | WebEditor.of(plugin) | Editing a plugin's files from the browser. |
| Logs | Logs.of(plugin) | A staff audit log every plugin records into, read with /exylialib logs. |
Storage#
| Module | Entry point | What it is for |
|---|---|---|
| Database | Databases.of(plugin) | Records in H2, MySQL, MariaDB, PostgreSQL or MongoDB. |
| Transfer | Transfers.of(plugin) | A plugin's whole database out to one file and back. |
| Redis | configuration | A shared cache that makes one database look the same from every server. |
| Snapshots | Snapshots.of(plugin) | A player's state kept for later, in memory or stored. |
| Proxy | Proxy.request(module, payload) | Talking to ExyliaProxyUtils on Velocity or BungeeCord, and every request answered. |
Interfaces#
| Module | Entry point | What it is for |
|---|---|---|
| Menus | Menus.of(plugin) | Menus written in configuration: lists, templates, conditions, live values. |
| Items | Items.of(plugin) | Items described in configuration, read once and drawn per player. |
| Actions | Actions.of(plugin, namespace) | Compiled, namespaced actions shared by menus and items. |
| Input | Inputs.of(plugin) | Asking a player for text, numbers, choices or a whole form. |
| Editors | Editors.of(plugin) | Screens for editing the lists a plugin configures. |
| Wizards | Wizards.of(plugin) | Walking a player through several questions, applied only on confirm. |
| Previews | Previews.of(plugin) | Showing one player an effect against an empty sky. |
| Heads | Heads.browse(inputs, …) | The decorative head catalogue, searchable from a menu, a page at a time. |
| Interactions | Interactions.compile(plugin, lines) | What clicking something in the world does: lines with click filters, commands and effect tokens. |
| Tuner | Tuner.of(plugin, subject) | Fine adjustment with the mouse wheel, with a boss-bar HUD and a live preview. |
| Settings | Settings.register(plugin, setting) | Player preferences every plugin registers into, and the one /settings screen. |
| Toasts | Toasts.send(player, icon, title, frame) | The advancement popup in the corner, with a configurable fallback. |
| Notices | Notices.of(plugin) | Messages left for a player: shown now, across the network, or on their next join. |
| Discord webhooks | Webhooks.of(plugin) | Messages to Discord written in config, with escaped values and rate limits. |
On screen#
| Module | Entry point | What it is for |
|---|---|---|
| Effects | Effects.play(config, viewer) | Titles, action bars, boss bars, sounds, particles, fireworks. |
| Sequences | Sequences.of(plugin) | Choreographed effects from configuration: twenty-six shapes, sounds, delays, displays and bodies. |
| Displays | Displays.of(plugin) | Item, block and text displays that move, spin and fall by themselves, animated by the client. |
| NPCs | Npcs.of(plugin) | Player-shaped bodies that exist only on a client. |
| Ragdolls | Ragdolls.of(plugin) | One of those bodies coming apart, in twelve poses. |
| Overlays | Overlays.of(plugin) | Items in a player's own inventory that the server does not have. |
| Packets | Packets.of(plugin) | Vanish, fake blocks, per-player world borders, freezing, a fake spectator, silent chest viewing and item lines. |
| Scoreboard | Scoreboards.show(plugin, player, config) | Packet sidebars declared in config. |
| Hologram | Holograms.show(plugin, id, location, config) | Packet holograms declared in config: line tags, pages, clicks and buttons. |
| Nametags | Nametags.of(plugin) | Name colour, glow and collision as one player sees another. |
| Chat | Chats.rule(plugin, rule) | Who reads whose messages, taken off the audience before delivery. |
| Cosmetics | Cosmetics.rule(plugin, rule) | Whether a player's cosmetics are drawn — one question every cosmetic plugin asks. |
| Client | Clients.of(plugin) | Lunar, Feather and the SurvivalCore mod: waypoints, teams, HUD timers and bars, cooldowns. |
| Skulls | Skulls.player(name) | Player heads from base64, a URL or a name — cached, never blocking. |
| Models | Models.of(plugin) | Blockbench models worn by living entities, with no resource pack. |
| VFX | Vfx.at(location) | Effects built in Java and played as one timeline: displays, sounds, particles, screen shake. |
| Cameras | Cameras.of(plugin) | Showing a player themselves from outside, and always giving the view back. |
| Replays | Replays.of(plugin) | Recording what happened and playing it back as packet bodies. |
| Showcases | Showcases.of(plugin) | Places that show a plugin's cosmetics off on a loop to whoever stands near. |
World#
| Module | Entry point | What it is for |
|---|---|---|
| Regions | Regions.of(plugin) | Shapes, a spatial index, overlap policies, enter/exit events, outlines. |
| Schematics | Schematics.of(plugin) | Saving a box of the world and pasting it back. |
| World | Worlds.create(key, name) | Creating and deleting worlds, from any thread. |
| WorldGuard | WorldGuardRegions, WorldGuardFlags | Region lookups and the ecosystem's own flags — kill-effects, hit-effects, arrows-effects — with no compile-time dependency. |
| Blocks | Blocks.of(plugin) | Blocks that answer clicks instead of behaving like their material, and whether a player placed a block. |
Players#
| Module | Entry point | What it is for |
|---|---|---|
| Sessions | Sessions.of(plugin) | One claim registry so two plugins cannot hold the same player. |
| Players | ExyliaPlayers.of(…) | One ExyliaPlayer over online, offline and network players, resolved without blocking. |
| Stays | Stays.of(plugin) | A player kept in an arena and given back exactly as they came. |
| Cooldowns | Cooldowns.forPlugin(plugin) | The base every cooldown in the ecosystem sits on. |
| Schedules | Schedules.of(plugin) | Timetables: what starts by itself, when, and under what conditions. |
| Teleport | Teleports.of(plugin) | Warmups, safe landings, /back, requests and handovers. |
| Combat | Combat.isTagged(player) | Whether a player is fighting, over DeluxeCombat or PvPManager. |
| Clan | Clans.clanOf(uuid) | One API over eight clan plugins and external bridges. |
| Mobs | Mobs.of(plugin) | Custom mobs from a template, with skills, phases and who hurt them reported on death. |
Things a player earns#
| Module | Entry point | What it is for |
|---|---|---|
| Rewards | Rewards.of(plugin) | Items, commands, money, odds and conditions — offline-safe. |
| Loot | Loot.parseAll(lines) | What comes out of a chest, a spawner or a broken block. |
| Economy | Economy.balance(uuid) | Balances, charges and transfers over Vault, PlayerPoints or your own currency. |
| Crates | Crates.of(plugin) | The roll, keys, reels, payout and blocks of a crate, shared; the rewards left to the plugin. |
| Modifiers | Modifiers.register(plugin, provider) | One multiplier pipeline for what players earn, fed by boosters, ranks and places. |
| Prices | Prices.sell(stack) | What an item sells for, answered by whichever shop or worth list has it. |
Newer modules#
- Minigame and network modules: arenas, escrow, trades, lobby, modes, network messages, playtime, respawns, hooks, parties, downed, objectives, transits, click spots, pet hooks.
- In-world screens and utilities: spatial menus, stage, crate scene, guide, abilities, action bars, build zones, runtime commands.
- In-game settings:
/exylialib config. - Server versions: Paper 1.21.1 support.
- Setup wizard:
/exylialib setup, the database move and sharing one database. - Screens and screen markup: packet-only 2D menus with a cursor, menu style, XHTML and CSS.
- HUD: widgets, notices and moments that never take the controls.
- Leaderboards: self-keeping tops per day, week, month, year and all time.
- Lobby and economy tools: hotbars, double jump, jump pads, dialogues, kit room, ledger.
Not a module#
| Class | What it is |
|---|---|
net.exylia.lib.ExyliaLib | The plugin itself: lifecycle and cleanup, nothing else. |
net.exylia.lib.platform.Platform | current(), isFolia(), isPaper(). |
net.exylia.lib.api.practicebot.PracticeBots | In the public API artifact: a bridge to the training-bot plugin, get() and available(). Empty when it is absent. |
net.exylia.lib.internal.* | Internal. Free to change without notice. |
| Cleanup | No API: plugins/ExyliaLib/cleanup.yml. The server's logs/ folder swept of files older than keep-days, a minute after startup and every six hours. |
Reloading#
Reloads.of(this)
.step("configs", () -> { settings.reload(); menus.reload(); })
.step("arenas", () -> arenas.load())
.run(sender);Each step reports for itself: one that throws is named in the console and the sender is told how many succeeded. A half-reloaded plugin that says nothing is worse than one that names what failed.
When /exylialib reload finds a plugin's language changed (language: default following a new library language), it runs
that plugin's whole declared Reloads once, so menus, messages and catalogues read the new language without a second command
(1.534.0+). Plugins take turns, one every few ticks, so the server keeps running while the language spreads (1.542.0+).
The Reloads a plugin declared last is also what runs after /exylialib updates apply or the
web editor writes one of its files, so the change is live without a manual
reload. Declare it once, in a field, rather than building it inside the reload command.
Reloads.onLibraryReload(this, () -> menus.reload());The library's own /exylialib reload fires that listener. The palette changing is the usual reason to
want it: every compiled menu is holding last week's colours until it is read again.
Plugin modules#
A plugin made of parts a server owner switches on and off. Each part has its own files, listeners, actions, menus, commands and timers, and a part that is off costs nothing.
modules = PluginModules.of(this, id -> settings.get().modules().switchOf(id));
modules.register(new MarketModule());
modules.register(new AuctionsModule()); // requiredModules() returns ["market"]
modules.registerActions(actions); // before the menus are compiled
menus.load(modules.menuIds());
modules.commandHandlers().forEach(lamp::register);
modules.loadOnlinePlayers(Bukkit.getOnlinePlayers());
modules.startTimers();public final class AuctionsModule extends PluginModule {
public AuctionsModule() { super("auctions"); }
@Override protected List<String> requiredModules() { return List.of("market"); }
@Override protected void registerConfigs() { config("modules/auctions/config", AuctionsConfig.class).load(); }
@Override protected void onEnable() { manager = new AuctionManager(); }
@Override protected void onDisable() { if (manager != null) manager.shutdown(); }
@Override protected List<Object> commandHandlers() { return List.of(new AuctionsCommand()); }
@Override protected void timers() { timer(20L, 20L, () -> manager.sweep()); }
}| A switch is read at startup | A module whose id has no switch in the config stays off and is reported, so a misspelt key never fails silently. A switch changed later is only reported by pendingRestart(), unless the plugin switches it live with setEnabled (below). |
| Requirements | requiredPlugins() and requiredModules() keep a module off, with a console line, while what it needs is missing. |
| One module never takes the others down | A module that throws while enabling has its new listeners removed, gets its own onDisable, and stays off; the rest still start. |
| Lookups answer only for running modules | getModule(id) and isEnabled(id) are empty for a module that is off, missing a requirement or failed. |
| Reload | reloadConfigs() reloads every running module, each on its own. reload(id) reloads one module in place — for an in-game editor that changed one module's settings. |
| Commands | commandHandlers() returns plain handler objects for the plugin to register with its own Lamp. registerCommands(lamp) is deprecated. |
On disable, disableAll() disables the running modules in reverse order.
Switching a module live#
Since 1.557.0, modules.setEnabled("auctions", false) turns a module on or off without a restart and returns a ModuleToggle
(succeeded(), changed(), missing(), menus()). Persisting the switch is the plugin's job.
| Status | Meaning |
|---|---|
ENABLED / DISABLED | it runs, or is off, now; changed() holds the dependants that moved with it |
UNCHANGED | it already was in that state |
BLOCKED | it stays off: missing() names the plugins or modules it needs that are not running |
FAILED | it threw while enabling, was released and stays off |
UNKNOWN | no module has that id |
- Off: every running module that needs it goes off first, last registered first: listeners from
onEnableare unregistered, timers stop,onDisableruns. On:registerConfigs,onEnable, actions, online players, timers, then the dependants whose switch is on come back. The switch asked for wins for the rest of the run. - Actions of an off module answer
stop("switched off")(actions.onlyWhile(module::isEnabled)), so compiled menus keep working. - Commands cannot be unregistered in Lamp: register
modules.allCommandHandlers()and refuse an off module's commands with onecommandConditionusingmodules.offModuleOf(method).
Debug output#
Debug debug = Debug.of(this);
debug.success("Configs loaded");
debug.warn("Arena 'main' has no schematic");
debug.error("Could not reach the database", failure);
debug.debug("Session drained: " + entries); // only when debug is onDebug.all(true) turns debug lines on for every plugin at once, which is the switch to reach for when
reproducing something rather than editing each plugin's config.
Something missing on this page? Tell us on Discord