Categories
Categories group currencies in the Currency Manager GUI
and in the currencies/ folder. They're optional: with no categories defined, the manager shows
one flat list, exactly as before.
Turning it on
Two things are needed:
- At least one category in
plugins/Obfeco/categories.yml. use-categories: trueinconfig.yml:
yaml
gui:
currency-manager:
use-categories: true
Run /obfeco reload after editing either file.
categories.yml
The file ships with categories: {} and a commented example:
yaml
categories:
economy:
display-name: "Economy"
icon: GOLD_INGOT
order: 1
subcategories:
primary:
display-name: "Primary"
order: 1
premium:
display-name: "Premium"
order: 2
events:
display-name: "Event Currencies"
icon: NETHER_STAR
order: 2
| Key | Default | Description |
|---|---|---|
<id> |
— | The category id, lowercased. Also the folder name under currencies/. |
display-name |
the id | Name shown in the category menu. MiniMessage tags work. |
icon |
CHEST |
Material for the menu item. An invalid material falls back to a chest. |
order |
0 |
Sort order in the menu, lowest first. |
subcategories.<id>.display-name |
the id | Name shown in the subcategory menu. |
subcategories.<id>.order |
0 |
Sort order within the category. |
Subcategories are optional. A category without them goes straight to its currency list.
Putting currencies in a category
Any of these works:
- Folders: move the file to
currencies/<category>/orcurrencies/<category>/<subcategory>/and run/obfeco reload. The folder always wins over thecategory:key inside the file. - Command:
/obfeco create <id> <name> <start> <decimals> <category> [subcategory]. The category and subcategory must exist incategories.yml. - Editor GUI: set the Category and Subcategory fields. The file moves to the matching folder.
Folder names are the lowercased ids. Anything other than a-z, 0-9, _ and - in an id is
replaced with _ when the folder is created, so keep category ids to those characters.
Uncategorized
Currencies with no category, or with a category id that isn't in categories.yml, appear under a
built-in Uncategorized entry at the end of the category menu.