How to Make a Job Category
Job categories split jobs into separate groups, such as classes and races, each with its own GUI, command and job limit. Jobs in one category do not count towards the limit of another. This page covers making one from scratch.
Quick start
Open the
/categories/folder inside the EcoJobs plugin folder.Copy
_example.ymland rename it to your category's ID, e.g.classes.yml.Set the
name, thelimitand thecommandthat opens it.Add
category: classesto each job config that belongs to it.Run
/ecojobs reload, then/classesto open the category's GUI.
Naming and IDs
The file name without .yml is the category's ID. This is what jobs reference with their category option, and what the limit permission and placeholders use.
The structure of a category
| Part | What it controls |
|---|---|
| Info | The category's name and job limit |
| Command | The command that opens the category's GUI |
| GUI | Changes to the jobs GUI for this category |
# === Info: name and job limit ===
name: "&6Classes" # The display name of the category.
limit: 1 # The most jobs in this category a player can have active at once.
# === Command: how players open it ===
command: classes # Optional. A command that opens this category's jobs GUI.
# === GUI: changes to the jobs GUI ===
gui: # Optional. Replaces sections of the gui section in config.yml.
title: "Classes &7(&f%page%&7/&f%max_page%&7)"
Info
The limit works like jobs.limit in config.yml, but only counts jobs in this category. Give a player a higher limit with the ecojobs.limit.<category>.<number> permission, e.g. ecojobs.limit.classes.2.
name: "&6Classes" # The display name of the category.
limit: 1 # The most jobs in this category a player can have active at once.
Command
The command opens a jobs GUI that lists only this category's jobs. It uses the ecojobs.command.jobs permission, like /jobs.
command: classes # Optional. A command that opens this category's jobs GUI.
GUI
The category's GUI uses the gui section from config.yml. Any key set here replaces the matching key there, and each key replaces the whole section under it, so copy the full section you want to change.
gui:
title: "Classes &7(&f%page%&7/&f%max_page%&7)"
player-info: # The whole player-info section, copied from config.yml and changed.
...
Internal placeholders
| Placeholder | Description |
|---|---|
%ecojobs_limit_<category>% | The most jobs in the category the player can have active at once |
%ecojobs_in_jobs_<category>% | The jobs in the category the player has active |
Where to go next
How to make a Job: add jobs to your category with
category: <id>.PlaceholderAPI: show category limits in GUIs and scoreboards.
Defaults: the example category lives here.