shop.yml

What farmpoints buy in /farmpoints shop.

An entry

items:
  diamond:
    slot: 10
    price: 50
    give:
      material: DIAMOND
      amount: 1
      name: ""
      lore: []
      custom-model-data: 0
      itemsadder: ""
    commands: []
    display:
      name: "lang:content.shop.diamond.name"
      lore:
        - "lang:content.shop.diamond.lore"
Key What it does
slot Where the icon sits in the shop menu, 0-indexed
price Farmpoints taken on purchase
give The item handed over. Leave the block out entirely, or set the material to AIR, to hand over nothing
commands Console commands on purchase, {player} is the buyer
display How the icon looks. {price} in a lore line prints the cost
type Set to boost for a boost entry
boost Only read when type is boost
enabled false takes the entry out of the shop without deleting it

Leave display.name and display.lore empty to fall back to the give item’s own name.

The boost block

Key What it does
boost-type xp, money or farmpoints. Left out means xp
job A job id, or all for every job
multiplier What the boost multiplies by. Has to be above 1.0
duration How long the boost lasts, in seconds
as-item true hands the boost over as an item to right click later, false starts it on the spot. Leave the line out to follow boosts.as-item in config.yml

Three kinds of entry

Item
Command only
Boost
xp-bottles:
  slot: 12
  price: 25
  give:
    material: EXPERIENCE_BOTTLE
    amount: 16
  commands: []
  display:
    name: "lang:content.shop.xp-bottles.name"
fly-command:
  slot: 14
  price: 200
  give:
    material: AIR
    amount: 1
  commands:
    - "say {player} bought something from the farmpoints shop"
  display:
    material: FEATHER
    name: "lang:content.shop.fly-command.name"

Leave the give material as AIR to hand over nothing and let the commands do the work.

money-boost:
  slot: 20
  price: 750
  type: boost
  boost:
    boost-type: money
    job: all
    multiplier: 2.0
    duration: 1800
    as-item: false
  give:
    material: AIR
  display:
    material: GOLD_INGOT
    name: "lang:content.shop.money-boost.name"

boost-type takes xp, money or farmpoints, and leaving it out means xp. job takes a job id or all. duration is in seconds. as-item decides whether this entry starts the boost or hands it over as an item; delete the line to follow boosts.as-item in config.yml.

Translated names

Any name or lore line written as lang:some.route is read from the player’s language file, so the shop follows the same language as the rest of the menus. The bundled items point at the content.shop block in lang/en.yml, lang/fr.yml, and lang/es.yml.

Adding your own item

Write the name and lore literally first to get the entry working, then move the text into the three language files once you are happy with it.

Slots

The shop menu is six rows, so slots run 0 to 53. Row two starts at 9, row three at 18.

Shop entries are drawn over the menu frame, so an entry on the same slot as the balance item, the filler or the close button wins and the button underneath it stops working. A click on a covered close button buys the entry instead of closing the menu.

Two entries on one slot

Only one of them shows up. The console names both entries on load, so check the startup log after moving things around.

What is checked on load

An entry with something wrong in it is called out in the console by id, once per start, so it keeps warning until you fix it or delete it.

Warned about What happens
type: boost with no boost block The entry is kept out of the shop
A boost duration of 0 The entry is kept out of the shop
A boost multiplier of 1 or less The entry still sells, and multiplies by nothing
A boost-type that is not xp, money or farmpoints Read as xp
A boost job that is not a job id in jobs.yml The boost matches no job, so it multiplies nothing
A slot outside the shop menu The entry does not show up
Two entries on one slot Only one of them shows up

A boost entry that cannot grant a boost is kept out of the menu rather than taking farmpoints for nothing.

Adding a new item

  1. Pick a free slot
    Check the existing entries first.

  2. Copy the closest entry
    Item, command-only, or boost.

  3. Set the price
    Against what a player earns per hour in farmpoints, not against the item’s vanilla value.

  4. Add the language routes
    content.shop.<id>.name and .lore in all three language files, or write literal text.

  5. Save and check
    With auto-reload on the shop rebuilds itself, otherwise /corejobs reload.

Writing entries from in game

/corejobs shop boost, /corejobs shop add, /corejobs shop remove and /corejobs shop list write this same file and reparse it, so an entry made in game is editable by hand afterwards. The arguments are on Commands.

A boost entry made that way gets its name and lore from shop.created-boost-name and shop.created-boost-lore in your language file, filled in once at creation. That means it is written out in the language that was active at the time rather than as a lang: route, because a route cannot carry that entry’s own multiplier and duration. Point it at your own route afterwards if you want it translated.

Removing a bundled entry

/corejobs shop remove deletes an entry you added, but a bundled one is switched off with enabled: false instead. Deleting a bundled entry by hand does not stick: the file updater writes it back on the next start.