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

  1. Open the /categories/ folder inside the EcoJobs plugin folder.

  2. Copy _example.yml and rename it to your category's ID, e.g. classes.yml.

  3. Set the name, the limit and the command that opens it.

  4. Add category: classes to each job config that belongs to it.

  5. Run /ecojobs reload, then /classes to 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

PartWhat it controls
InfoThe category's name and job limit
CommandThe command that opens the category's GUI
GUIChanges 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

PlaceholderDescription
%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.