-
Notifications
You must be signed in to change notification settings - Fork 0
Categories
The categories down column 1 of the browser are defined by files in plugins/RoyalAuctions/categories/. The file name is the category id — categories/weapons.yml defines weapons. Add a category by dropping in a file; remove one by deleting its file. Column order comes from each file's priority (lowest first).
# categories/weapons.yml
display-name: "&cWeapons"
icon: DIAMOND_SWORD
priority: 10
match:
items: [] # exact pins — see below
# - "ecoitems:brazen_sword"
material-suffixes: ["_SWORD", "_AXE"]
materials: ["BOW", "CROSSBOW", "TRIDENT", "MACE"]
tags: ["WEAPON"] # EDIBLE BLOCK ARMOR TOOL WEAPONThe default set is weapons, armor, accessories, consumables, blocks, and tools_misc (the catch-all).
| Rule | Matches |
|---|---|
items |
Exact item pins — eco ids (ecoitems:brazen_sword) and vanilla (minecraft:trident). |
eco-namespaces |
A whole eco plugin → this category ([talismans], [ecoarmor], …). |
materials |
Exact Bukkit material names. |
material-suffixes |
Material name ends with any of these (_SWORD). |
material-prefixes |
Material name starts with any of these. |
tags |
Built-in flags: EDIBLE, BLOCK, ARMOR, TOOL, WEAPON. |
any |
true = catch-all (matches everything). |
Resolution order for every item:
-
match.items— an exact pin. Beats every other rule, in any category, at any priority. This is the escape hatch. -
match.eco-namespaces— a whole eco plugin maps to one category. -
materials/ suffixes / prefixes /tags— inferred from the item's base material. -
match.any: true— the catch-all.
The important caveat: rules 2–3 infer from the base material, which is only ever a guess for a custom item. A custom sword built on a STICK would otherwise land in Tools & Misc — so you pin it with match.items.
Exactly one category must be the catch-all (any: true, highest priority number) or items matching nothing would have nowhere to go. That's tools_misc.yml by default.
Hold an item and run /ah category. It prints the item key, where it lands, which rule decided it, and its tier. This is how you check whether the plugin is guessing.
On startup, every eco item that only hit the catch-all is logged:
[RoyalAuctions] Category audit: 24 of 141 eco item(s) fell through to 'tools_misc'.
Pin them under a category's match.items: if they belong elsewhere:
- ecoitems:enchanted_diamond
- stattrackers:arrows_shot
...
This tells you exactly which items are worth pinning — instead of leaving you to enumerate every material in the game. When everything resolves it prints Category audit: all N eco items resolved to a category.
category-options:
strict-items: true # ONLY items pinned via match.items: get a category.
# Everything else goes to the catch-all. No guessing at all.false (default) uses pins first, then the inference rules — works out of the box. true is for servers that want total control and no surprises.
A listing's category is stamped when it's created, so renaming a category id would strand every existing listing under an id no button matches. RoyalAuctions re-derives and persists those on load instead:
[RoyalAuctions] Re-categorised 3 listing(s) whose category no longer exists.
Upgrading from an old version with a categories: block inside config.yml? It's split into categories/*.yml automatically on first start, and the plugin tells you the old block can be deleted.
RoyalAuctions · part of the eco suite (RoyalBank · RoyalBazaar · EconGuard) · Source on GitHub
Getting started
Using it
- Buying, Selling & Bidding
- Menus & GUI
- Categories
- Item Tiers
- NPCs (Citizens)
- PlaceholderAPI
- EconGuard Integration
- Storage & Data
Help