# Home

Welcome to AdvancedJobs wiki!

### Plugin Links:

* AdvancedPlugins.net <https://advancedplugins.net/item/AdvancedJobs.187>


# Creating Jobs

AdvancedJobs allows for the creation and customization of jobs in two primary ways: through direct configuration files or via an intuitive, state-of-the-art in-game GUI editor. This flexibility ensures that server administrators can tailor jobs to the unique needs and playstyles of their server community, whether they prefer working with files or graphical interfaces.

## Configuration Files

Jobs can be manually created and customized by editing YAML configuration files located in the `/plugins/advancedjobs/jobs` folder. This method is ideal for those who prefer direct control over job parameters and enjoy working with text-based configurations.

#### Steps:

1. Navigate to `/plugins/advancedjobs/jobs`.
2. Create or edit a `.yml` file for your job (e.g., `miner.yml`, `farmer.yml`).
3. Define job attributes according to the plugin's job configuration schema, including actions, rewards, levels, and more.
4. Save your changes and reload the plugin to apply them.

## Special Cases Progress

You can specify different cases progress, e.g. with kill-mob action, to assign different progress points: <https://battlepass.advancedplugins.net/quests/special-progress>

## Job Permissions

You can add permissions to jobs using the guide here: [Commands & Permissions](/general/commands-and-permissions#per-job-permission)

## Progress Rewards

Do you want to reward player for each progress (i.e. for each mined block)? Use `progress-actions`. Firstly, you need to create [rewards](https://jobs.advancedplugins.net/tutorials/rewards-guide). You can use `%progress%` placeholder in reward's variables.

Example:

```yaml
"11":
    type: money # This reward required Vault
    name: "money reward for progress-actions"
    variables:
        value: "(%level% * %progress% * 0.1) * (1 + (%booster% / 100))"
    value: "%value%"

"12":
    type: item
    name: "item reward for progress-actions"
    variables:
        value: "(%level% * %progress% * 2) * (1 + (%booster% / 100))"
    items:
        "1":
            material: coal:0
            amount: "%value%"
```

Now, you can add these rewards into `progress-actions.rewards` section. You can also override progress message to show how much money player got.

(To use reward variable inside message, use `%reward.ID.VARIABLE%` i.e. `reward.11.value` means `value` variable in `11` reward)

```yaml
progress-actions:
    rewards: ["11", "12"]
    override-message: "&7| &a+&2$%reward.11.value% &f+&0%reward.12.value% &7(&e%progress%&7/%required_progress%&7) &7[&e%job_name%&7] &7|"
```

## In-Game GUI Editor

For those who prefer a more visual approach, AdvancedJobs offers an EASY TO USE, in-game GUI editor. This tool eliminates the need to directly edit configuration files, providing a user-friendly interface for creating and modifying jobs.

#### Accessing the Editor:

* Use the command `/ajadmin editor` to open the in-game job editor.

#### Features:

* **Intuitive Design**: The GUI is designed to be user-friendly, making job creation accessible to everyone.
* **Real-Time Editing**: Make changes and see them reflected immediately in-game, allowing for dynamic adjustments.


# Languages

All translations are available in `.yml` format and can be directly used in the plugin's `lang` folder.

#### Available Languages

* English (en.yml)
* German (de.yml)
* Spanish (es.yml)
* French (fr.yml)
* Danish (da.yml)
* Dutch (nl.yml)
* Korean (ko.yml)
* Simplified Chinese (zh-cn.yml)

#### How to Use

Go into your config.yml file. Change this to your desired language code: `language: "en" # Available: en, de, es, fr, da, nl, ko, zh_CN` Restart the server or reload the plugin

#### Contributing

If you'd like to contribute a new translation or improve existing ones, please visit our GitHub repository.

Note: All translations maintain the same color codes and formatting as the original English version.


# Default Jobs

## Default Jobs in AdvancedJobs

AdvancedJobs offers a robust selection of 20 pre-made jobs, fully configured and ready to enhance your server's gameplay right out of the box! In addition to these, AdvancedJobs provides the flexibility to customize existing jobs or create entirely new ones to suit your server's unique needs.

### Pre-made Jobs:

* `beekeeper.yml`: Embark on the sweet journey of beekeeping.
* `breeder.yml`: Master the art of animal breeding.
* `brewer.yml`: Craft potions with skill as a Brewer.
* `builder.yml`: Construct marvels as a Builder.
* `crafter.yml`: Create a variety of items as a Crafter.
* `customenchanter.yml`: Specialize in creating unique enchantments.
* `enchanter.yml`: Harness the power of enchanting.
* `explorer.yml`: Venture into unknown territories as an Explorer.
* `farmer.yml`: Cultivate the land and harvest crops as a Farmer.
* `fighter.yml`: Engage in combat as a valiant Fighter.
* `fisherman.yml`: Reel in the biggest catches as a Fisherman.
* `glider.yml`: Soar the skies with precision as a Glider.
* `gourmet.yml`: Feast on culinary delights as a Gourmet.
* `hunter.yml`: Track and hunt down mobs as a Hunter.
* `lumberjack.yml`: Chop down trees and gather wood as a Lumberjack.
* `miner.yml`: Mine ores and explore caves as a Miner.
* `runner.yml`: Race across the land with speed as a Runner.
* `smelter.yml`: Refine ores and materials as a Smelter.
* `swimmer.yml`: Navigate waters with ease as a Swimmer.
* `tamer.yml`: Tame and befriend various creatures as a Tamer.

Explore the possibilities and expand your server's job system with AdvancedJobs, where your creativity is the only limit.


# Job Join and Leave Conditions

## Job Leave Conditions, Variables and Commands

* By default disabled for job - meaning there's no conditions for joining and leaving
* Requires PlaceholderAPI

When player leaves a job, they need to meet specific conditions. After that plugin executes console commands with variables similar to variables in command rewards.

{% hint style="info" %}
This configuration must be added inside each job file you want to set up the conditions for.
{% endhint %}

### Example Configuration

```
# Requires PlaceholdersAPI
job-leave:
  # Conditions required to leave job.
  # Use placeholders from PlaceholdersAPI and >,<,==
  conditions:
    or: # At least one of these conditions must be meet
      - "%player_level% > 0"
      - "%player_has_permission_jobs.leave.bypass% == yes"
    and: [ ] # All of these conditions must be meet
  # Similar to variables in rewards
  variables:
    cost: "<if>%player_has_permission_jobs.leave.bypass% == yes ? 0 : -1</if>"
  # Commands to execute after leaving job
  commands:
    - "experience add %player% %cost% levels"
```

Using this configuration, player needs to have at least 1st experience level **OR** have permission `jobs.leave.bypass`. When player meet these conditions, they can leave job, but if they don't have that permission, they lose 1 level.

### Types of conditions

#### Or conditions

Player needs to meet at least one condition (same as `||` operator in Java)

#### And conditions

Player needs to meet all conditions (same as `&&` operator in Java)

## Job Join Conditions

The format is the same, but instead of `job-leave` it will use the `job-join` key.\\


# PlaceholderAPI Endless Jobs

It's never been this easy to make jobs for 1000+ other plugins.

Unlock limitless job creation possibilities with our PlaceholderAPI integration. Dive into a world of customization and explore how to tailor jobs to your server's unique needs by visiting our comprehensive guide on PlaceholderAPI actions: <https://wiki.advancedplugins.net/actions/placeholderapi-actions>


# Boosters

```
/aja boosters add <player/all> <PROGRESS/POINTS/REWARDS> <percent> <hours> <affects> - Adds booster
/aja boosters clear <player/all> - Removes boosters

/aja boosters - List of all active boosters
```

* hours can be decimal. I.e. 0.5 means 30 minutes

### **Possible "affects" arg**

```
 Possible cases (split with ,): [PROGRESS/POINTS]
    - all
    - free
    - premium
    - job-J

    J - ID of job

    Example: free,job-explorer
    Booster will affect all free jobs and explorer job

    Possible cases (split with ,): [REWARDS]
    - all
    - free
    - premium
    - job-J
    - reward-R

   R - ID of reward
   J - ID of job

   Example: free,reward-1
   Booster will affect all rewards in free jobs and reward with ID 1
```

### %booster% arg in reward's variables

To make boosters work in rewards, we need to use new placeholder - `%booster%`

Example:

```
  variables:
    value: "(2 * %tier%) * (1 + (%booster% / 100))"
```

### Boosters strategy

Boosters have 3 different strategies. It's important when player has more than 1 active booster at once

`boosters-strategy` in `settings.yml`

```
# SUM - If player has multiple boosters, plugin will sum them
# Example:
# - Server booster +10%
# - Player booster +7%
# - Player booster +5%
# Final booster: 10 + 7 + 5 = 22%
#
# SUM_DIFFERENT - If player has multiple boosters, highest server booster will be added to the highest player booster
# Example:
# - Server booster +10%
# - Player booster +7%
# - Player booster +5%
# Final booster: 10 + 7 = 17%
#
# HIGHEST - If player has multiple boosters, plugin will use the highest booster
# Example:
# - Server booster +10%
# - Player booster +7%
# - Player booster +5%
# Final booster: 10%
```

### Permission Boosters

You can configure "permission boosters" in `plugins/AdvancedJobs/config.yml` in `permission-boosters` section.

```yaml
# Permission based boosters
# Players with permission `advancedjobs.booster.<booster-id>` will get the booster
# IMPORTANT: This boosters work only for ONLINE players.
permission-boosters:
    "extra25": #  Permission 'advancedjobs.booster.extra25'
        percent: 25.0
        affects: all
        type: PROGRESS
```


# Mult-Type Jobs

AdvancedJobs allows for the creation of complex job configurations through the use of multi-type jobs. This feature enables a single job to progress through multiple action types, providing a more diverse and engaging gameplay experience.

## Example Configuration

Here's an example of a multi-type job configuration:

```yaml
types:
    1:
        type: crops-planted
        variable: none
        multiplier: 0.25
        special-progress:
            - "nether_wart 2"
    2:
        type: harvest-crops
        variable:
            root: CARROTS
```

In this example, player will progress job in these cases:

* When harvesting carrots (1 point per carrot)
* When planting nether warts (0.25 \* 2 = 0.5 point per nether wart)
* When planting other crops (0.25 per planted crop)

**Note**: When using only one type, you can use the old system.


# Commands & Permissions

### Number of Jobs Permission

{% hint style="success" %}
**To specify how many jobs a player is able to have, use permission** `advancedjobs.slots.<number>`
{% endhint %}

### Premium Pass

**Premium jobs pass permission**: `advancedjobs.premium`

### Per-Job Permission

You can enable per-job permissions by adding `permission: 'permission'` setting to each of the job files, e.g. like this:

<div align="left"><figure><img src="https://1818620694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8JS6y5kSxzaAu16B1YPi%2Fuploads%2Fgit-blob-1f6b57c27d6ea37bb5db7d63d6be9737dd2b00ae%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure></div>

### Player Commands

#### /advancedjobs (aliases: /aj, /jobs)

* **Permission**: `jobs.use`
* **Description**: Opens the jobs interface, allowing players to browse and select jobs.

### Administrative Commands

Administrative commands offer a range of functionalities from reloading configurations to managing user job data. These commands require the `jobs.admin` permission.

#### /advancedjobsadmin (aliases: /ajadmin)

* **Permission**: `jobs.admin`
* **Description**: Access base command for admin functionalities.

#### /ajadmin reload

* **Description**: Reloads all configurations and job files.

#### /ajadmin delete user

* **Description**: Deletes a user's job data.

#### /ajadmin give points

* **Description**: Awards job points to a user.

#### /ajadmin levelup

* **Description**: Manually level up a user in a specific job.

#### /ajadmin editor

* **Description**: Opens the in-game quest editor.

#### /ajadmin refresh jobs

* **Description**: Refreshes daily jobs for all players.

#### /ajadmin reset jobs

* **Description**: Resets all job progress for all players.

#### /ajadmin set points

* **Description**: Sets a user's job points to a specific amount.

#### /ajadmin sync jobs

* **Description**: Synchronizes job data across bungee or MySQL servers.

These commands are designed to give server administrators full control over the AdvancedJobs plugin, enabling them to customize the job system to fit their server's needs.


# PlaceholderAPI Placeholders

## AdvancedJobs PlaceholderAPI Placeholders

AdvancedJobs integrates seamlessly with PlaceholderAPI, offering a wide array of placeholders that provide dynamic information about jobs. These placeholders can be used in various parts of your server, such as in chat, on scoreboards, or within GUIs, to display job-specific data for each player. Below is a table outlining the available placeholders and their functions:

<table data-full-width="true"><thead><tr><th>Placeholder</th><th>Explanation</th></tr></thead><tbody><tr><td><code>%advancedjobs_limit%</code></td><td>The maximum number of jobs a player can have.</td></tr><tr><td><code>%advancedjobs_in_jobs%</code></td><td>The current number of active jobs a player is part of.</td></tr><tr><td><code>%advancedjobs_active%</code></td><td>List of all player's jobs</td></tr><tr><td><code>%advancedjobs_current_points%</code></td><td>The current points a player has accumulated.</td></tr><tr><td><code>%advancedjobs_&#x3C;job>%</code><br><code>%advancedjobs_&#x3C;job>_level%</code></td><td>The player's level in the specified job.</td></tr><tr><td><code>%advancedjobs_&#x3C;job>_name%</code></td><td>The name of the specified job.</td></tr><tr><td><code>%advancedjobs_&#x3C;job>_active%</code></td><td>Whether the player currently has the specified job active (<code>true</code> or <code>false</code>).</td></tr><tr><td><code>%advancedjobs_&#x3C;job>_percentage_progress%</code></td><td>The player's progress percentage towards the next level in the specified job.</td></tr><tr><td><code>%advancedjobs_&#x3C;job>_required_points%</code></td><td>The total points required to reach the next level in the specified job.</td></tr><tr><td><code>%advancedjobs_&#x3C;job>_required_points_left%</code></td><td>The points a player needs to accumulate to reach the next level in the specified job.</td></tr><tr><td><code>%advancedjobs_daily_refresh_time%</code></td><td>Shows time left to daily refresh</td></tr></tbody></table>

* `<job>` - An ID of job **OR** the slot number (from 0) of player's active job. I.e. `%advancedjobs_0_name%` is a name of player's first active job

## Leaderboards

```
%advancedjobs_top_points_name_PLACE%
%advancedjobs_top_points_value_PLACE%
%advancedjobs_top_points_place_me%
%advancedjobs_top_points_value_me%

%advancedjobs_top_level_name_PLACE_JOB%
%advancedjobs_top_level_value_PLACE_JOB%
%advancedjobs_top_level_place_me_JOB%
%advancedjobs_top_level_value_me_JOB%
```


# Custom Heads in Menus

### AdvancedJobs supports both **base64** custom heads and **player names**.

To set custom heads in menus, it's as simple as setting correct material. Material format would be `head:<value>`, example with a player head:

```yaml
menu:
  4:
    item:
      material: head:GC
      name: '&eSeason 1 Battle Pass'
      lore:
        - '&7%pass_type% Battle Pass'
        - ''
        - '&7Week &f%week%'
        - ''
        - '&eStatistics'
        - '&f&l * &7Tier &f%tier%'
        - '&f&l * &7Points &f%points%&8/&f%required_points%'
```

Example with **base64** (custom head/skin):

```yaml
menu:
  '4':
    item:
      material: head:ewogICJ0aW1lc3RhbXAiIDogMTYyMzA4MTY3Nzk3MSwKICAicHJvZmlsZUlkIiA6ICIzNDQzMzliMGZhMmI0ZDU2OGQ5MmM3NmI5NzgyNmExYSIsCiAgInByb2ZpbGVOYW1lIiA6ICJ0b2phcGlrYWN6dSIsCiAgInNpZ25hdHVyZVJlcXVpcmVkIiA6IHRydWUsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9mZTVhMTBlOWJiODU4MjYzMDAyMjI1M2UyOTAwNmIxNTEyNTVkODQ3ODQ0ODc0ODFhYTczOGY4YTAzNzNiN2YzIgogICAgfQogIH0KfQ==
      name: '&eSeason 1 Battle Pass'
      lore:
        - '&7%pass_type% Battle Pass'
        - ''
        - '&7Week &f%week%'
        - ''
        - '&eStatistics'
        - '&f&l * &7Tier &f%tier%'
        - '&f&l * &7Points &f%points%&8/&f%required_points%'
```

### Player's head in GUI

Since 3.12.5, you are able to shown the user which opened the gui head. The format for material is using PlaceholderAPI, and you must have the `Player` ecloud extension.

```yaml
menu:
  '4':
    item:
      material: head:%player_name%
      name: '&ePlayer Head'
```

Useful links:

* <https://mineskin.org> - Create base64 textures from custom player skins
* <https://minecraft-heads.com> - Database of custom skins


# Rewards Guide

There are two types of reward formats you can use, one is command format or item format. You may use any plugin's command's in them as long as you use the "%player%" placeholder.

**List of mathematical functions which can be used inside variables ->** [**check**](https://ezylang.github.io/EvalEx/references/functions.html)

***

**COMMAND FORMAT BREAKDOWN**

Before we start you need to understand what you are editing and what each line of the format means and what it does. Below is a explanation next to each section of the format.

```yaml
"1": #(The reward id used to link it to a tier) (DONT USE THE SAME NUMBER TWICE)
    type: command #(Reward type)
    name: "Announces you achievement" #(Reward description)
    commands: #(Item or Command being excuted when reward is claimed)
        - "broadcast &6%player% reached a key BattlePass tier!!"
```

**COMMAND FORMAT:**

Here is a example using a ExcellentCrates command to give a key to the player.

```yaml
"1":
    type: command # You can still use commands to give items :)
    name: "&e1 Common Key"
    commands:
        - "crate key give %player% Common 1"
```

**MONEY FORMAT BREAKDOWN**

{% hint style="warning" %}
Money rewards require Vault and economy plugin which is compatible with Vault
{% endhint %}

Before we start you need to understand what you are editing and what each line of the format means and what it does. Below is a explanation next to each section of the format.

```yaml
"1": #(The reward id used to link it to a tier) (DONT USE THE SAME NUMBER TWICE)
    type: money #(Reward type)
    name: "$%value%" #(Reward name)
    variables: # List of variables which can be calculated and used in reward and in name
        value: "(3 * (5 * (%level% ^ 2))) * (1 + (%booster% / 100))" # `* (1 + (%booster% / 100))` allows to use reward boosters
    value: "%value%" # Money added for player - %value% is a placeholder of "value" variable (see previous line)
```

**MONEY FORMAT:**

Here is a example of giving $10 per level

```yaml
"1":
    type: money
    name: "+$%value%"
    variables:
        money: "(%level% * 10) * (1 + (%booster% / 100))"
    value: "%money%"
```

**ITEM FORMAT BREAKDOWN**

Before we start you need to understand what you are editing and what each line of the format means and what it does. Below is a explanation next to each section of the format.

```yaml
"1": #(The reward id used to link it to a tier) (DONT USE THE SAME NUMBER TWICE)
    type: item #(Reward type)
    name: "&eWOAH! Something cool" #(Reward description)
    items: #(List of items it will give the player)
        "1": # The first item reward (required) #
            material: diamond_block:0 #(Block/item you want to give)
            amount: 1 #(Amount of block/item you want to give)
            name: "" #(Custom block/item name) (Can be left null for default name)
            lore: [] #(Custom block/item description) (Can be left null for default name)
            glow: true #(If the block/item will have a enchantment glow)
        "2": # The second item reward (not required) -> You can have more than two.
            material: coal_block:0 #Block/item you want to give)
            amount: 1 #(Amount of block/item you want to give)
            name: "" #(Custom block/item name) (Can be left null for default name)
            lore: #(Custom block/item description) (Can be left null for default name)
                - "&7An &bawesome &7lore, for an &eawesome &7coal block" #(Description)
```

**ITEM FORMAT:**

Here is a example of giving a diamond sword with a custom name and lore to the player.

```yaml
"1":
    type: item
    name: "&eWOAH! Something cool"
    items:
        "1":
            material: diamond_sword:0
            amount: 1
            name: "&4MIGHTY SWORD"
            lore:
                - "&7Used to slay foes!"
```


# Per-Level Rewards

Setting up per-level rewards for jobs

Per-level rewards are rewards that are given for a specific level, once it's completed. Usually these are special levels where custom reward is assigned, not one with formulas, for example item rewards.

## How to set up per-level rewards

First off, the reward must be made in the `rewards.yml` file, and you must know the ID of it. To make a reward, follow the [Rewards Guide](/tutorials/rewards-guide) tutorial.

For this example, we've made a reward that gives 1 million $.

{% code title="rewards.yml" lineNumbers="true" %}

```yaml
'million': # The id of the reward
  type: command
  name: '$1,000,000'
  commands:
    - 'eco give %player% 1000000'
```

{% endcode %}

Once our reward is made, we now open our jobs file. The jobs files are located in `plugins/AdvancedJobs/jobs` folder.

Locate `level-rewards` line. Now we'll set up level 10 to give a reward by id `million`

{% code title="plugins/AdvancedJobs/jobs/job.yml" %}

```yaml
# levels info
level-rewards:
  10: 
    - million
```

{% endcode %}

That is it! You will now need to reload the plugin using `/ajadmin reload`, and your reward will be present for level 10 of the job in progress menu:

<figure><img src="https://1818620694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8JS6y5kSxzaAu16B1YPi%2Fuploads%2Fgit-blob-d1f20d513a3913878f021310b1bcaef2cb61d290%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>


