Skip to content

Creating and Editing a Job

Picono435 edited this page Jun 8, 2024 · 23 revisions

On this page, you will learn how to edit, create and delete jobs!

Creating a Job

Create a job is very easy you just need to follow the tutorial above.

  1. Go to plugin directory/settings/jobs.yml
  2. Copy and paste one of the job examples on the default config
  3. Change with the type of job you want and follow the instructions below!

Editing a Job

Editing a job was never easier! You just need to know some stuff that I will explain right in here.

Let's start first we want to go to the main directory of the plugin (plugins/PicoJobs by default) and go to the settings folder. When you get to the settings folder open the jobs.yml file, here we can find the entire configuration of the jobs. Let's see an example of a job in this configuration file.

hunter:
    displayname: "&eHunter"
    tag: "&e[H]"
    types: [kill_entity, fill_entity]
    method: 10
    require-permission: false
    salary: 1053
    max-salary: 50000
    salary-frequency: 0.3
    method-frequency: 0.4
    economy: VAULT
    use-whitelist: true
    whitelist:
        kill_entity: ["minecraft:cow", "minecraft:pig", "minecraft:chicken", "minecraft:sheep"]
        fill_entity: ["minecraft:cow"]
    work-message: "kill %a% animals"
    gui:
    	slot: 11
    	item: "GOLDEN_SWORD"
    	item-data: 0
    	enchanted: false
  	    	lore:
    	  - "&8Earn by hunting"
    	  - "&8 animals"

Let's go through this configuration step by step.

displayname

The display name is just a display configuration and it is used when it's necessary to make the job name appear in a pretty way. It is colour-supported you should change it to be like you like.

tag

The tag option is not used through the plugin by default, but it can be an important feature if you use the placeholder %jobplayer_tag%.

types

The types setting is the most important option in the entire job configuration. This little setting will decide what event will fire and make the method grow up! A list of values that you can set here can be found on the Types of Jobs page.

method

The method configuration is the main value to set the number of required things that you need to do to complete your work. An example of this value can be the number of items that you want to be crafted. This value will be automatically changed depending on the method-frequency and the number of works that the player is already done.

require-permission

This configuration will only be useful in some cases, it basically makes it so you can only get this job with specific permission. You can see a full list of permissions on the Permissions page

salary

The salary configuration is similar to the method as it depends on frequency too. Salary is what sets the amount of money you will earn when you complete your work. This value will be automatically changed depending on the salary-frequency and the number of works that the player is already done.

max-salary

The max-salary is a newly added option that makes the amount of money that you can earn have a limit. Like this, you will not earn trillions of money by staying 100 hours working xD.

salary-frequency

The salary frequency is responsible to change the amount of salary that a player can earn after each job. It changes the salary option directly with this count: amount of works done * salary setting * salary-frequency

method-frequency

The method frequency is responsible to change the method that a player needs to do for each job. It changes the method option directly with this count: amount of works done * method setting * method-frequency

economy

The economy option is an important setting for people that want to customize their server in the best way. This option allows you to change the things that you will earn when you finish your job, following the salary rules. A list of valid options for this setting can be found in this page of the wiki.

workzone

The workzone option is an important setting for people that want to customize their server in the best way. This option allows you to restrict the areas where the plugin detects you are doing an action for a work. A list of valid options for this setting can be found in this page of the wiki.

use-whitelist

The use-whitelist option is what says if the job will have a WHITELIST or a BLACKLIST, when this option is set to true it will be a whitelist when is set to false it will be a blacklist.

whitelist

NOTE: Because of a recent change to how PicoJobs works, whitelist values require a specific format in each whitelist type. Please check it in this wiki page.

This is the whitelist of the job, this option accepts a list of strings that can be jobs, items, blocks etc...! You can see what is accepted for each type in the Types Of Jobs page

work-message

The work message is used to set the work message of this job, this message can be found in many places of the job. This overrides the settings in the language file.

gui.slot

The slot setting allows you to set the slot where the job will appear in the Choose Jobs Menu.

gui.item

The item setting allows you to set the item that the job will appear as in the Choose Jobs Menu.

gui.item-data

The item setting allows you to set the item data that the job will appear as in the Choose Jobs Menu. Please keep in mind that this version is only used in LEGACY versions so versions older than 1.13.

gui.enchanted

The enchanted setting allows you to set if the item is enchanted or not in the Choose Jobs Menu. This setting will add an enchantment to the item but it will be removed from the lore.

gui.lore

The lore setting allows you to set the tooltip/lore of the item in the Choose Jobs Menu.