Advanced Configuration

Once your relics are working, these topics help you run OFTRelics on a real server: what it needs, how updates treat your files, adding new relic types, using relics from other plugins, where player data lives, and how to debug problems.

Requirements

ServerPaper 1.21.4 or newer (the plugin is built against the 1.21.4 API), Java 21
eco2026.41 or newer (required)
libreforgeLoaded by OFTRelics itself; built against 2026.41.1
packeteventsOptional. Needed for the spatial menu's screen mode and for hud.bar-on-top
ClientsMinecraft 1.21.4 or newer to see relic models, the menu background and the HUD

Updating the plugin

OFTRelics never overwrites files that already exist in plugins/OFTRelics/. That keeps your edits safe, but it also means an update doesn't change files you already have:

  • config.yml: keys you added (for example cursor-menu.layout.slots, or extra gui-glyphs and gui-icons) are kept on reload, and default keys missing from your file are added back. Whenever the file's keys differ from the defaults, eco rewrites the whole file, which drops its comments; the copy inside the plugin jar always keeps them.

  • relics/*.yml: a relic file you already have is never replaced by the new bundled version. To pick up a changed bundled relic, compare your file with the one in the jar and merge the changes by hand (or delete yours to get the new one).

  • pack/: bundled textures are copied only when the file doesn't exist yet. To pick up a redrawn texture, delete or replace your copy and run /oftrelics reloadpack.

Adding a new relic type

A type only needs slots that accept it:

  1. In config.yml, add a column of slots under relics-gui.slots, each with a unique id, a free row and column, and supports: [type:<your type>]. Copy one of the existing five-slot blocks as a template.

  2. Give the relics of that type type: <your type>.

  3. Optionally, add a category name in lang.yml under admin-gui.categories.

  4. Run /oftrelics reload.

Slot ids may use lowercase letters, numbers, _, . and -. A slot outside the menu (row above relics-gui.rows, column above 9), on a position another slot already uses, or with a duplicate id is ignored with a warning. The bundled menu background is drawn for the default five columns; with a different layout, draw your own (see Resource Pack) or clear relics-gui.background-glyph.

Using relics in other plugins

Relics are registered with eco's item lookup system as oftrelics:<relic id>, so you can use them anywhere an eco plugin takes an item, such as recipes, shop listings and rewards. For example, the Cosmos Cube is crafted from oftrelics:frost_cube, oftrelics:storm_cube, oftrelics:fury_cube and oftrelics:zephyr_cube.

OFTRelics also registers the item tag oftrelics:relic, which matches any relic.

A relic item is identified by data stored on it, not by its name or lore, so renaming a relic or changing its lore updates every existing copy the next time it's displayed. Deleting a relic's file makes existing copies stop working as relics; equipped copies are given back to their owners.

Where data is stored

DataStored in
Equipped relicsThe player's eco profile, so it follows eco's data storage (YAML, MySQL or MongoDB)
A relic's level, xp and soulbound ownerThe item itself
/oftrelics style and /oftrelics hud choicesThe player's eco profile
The game mode to restore after the spatial menuThe player's own data, until the menu closes or they next join

Equipping and unequipping are saved immediately. Xp gains on equipped relics are saved in batches every 30 seconds, when the player leaves, and when the server stops. If a stored relic can't be read (for example after a downgrade), the stored data is kept unchanged instead of being deleted, and the console warns.

Debug logging

debug:
  enabled: false # Master switch
  categories:
    relic-loading: true # Config parsing, registry clearing and item creation
    recipes: true # Recipe registration and permission checks
    loot: true # Every matching loot-table roll (noisy)
    resource-pack: true # Pack scan, build, hash and publish
    pack-http: false # Every request to the built-in pack host (very noisy)
    delivery: true # Pack sends and client responses
    display: false # Item display refreshes and the HUD (extremely noisy)
    equipment: true # Slot loading, equip/unequip and effect refreshes

With enabled: true, each category can be switched off on its own. Messages appear in the console as [Debug/<category>]. Warnings about broken configs are always logged, with or without debug.


Where to go next

  • Every config option: the Plugin Config reference.

  • The pack in depth: the Resource Pack page.

  • How slots and types fit together: The Gameplay.