Skip to content

Collected Materials File

Ali Arslan edited this page Nov 16, 2025 · 6 revisions

Collected Materials File

This file is where you configure Farmer's built-in economy. Even though we offer compability with other shop plugins, most optimized way is using the built-in economy.

Example

collected-materials:
  CACTUS:
    sellable: true
    unit-price: 1.5
    tax-price: 0.15
    levels:
      0:
        price: 1000
        capacity: 2500
      1:
        price: 1000
        unit-price: 1.6
        tax-price: 0.14
        capacity: 10000
        requirements:
          "playtime":
            display: "<blue>1 Hour Playtime (Current: <papi:'math_0:floor_{statistic_PLAY_ONE_MINUTE}/1200'>)"
            condition: "%math_({statistic_PLAY_ONE_MINUTE}/1200)>60%" # Math expansion is required for this operation
              # Math expansion returns 1 if given expression is valid
            # otherwise it returns 0
            required-output: "1"
          "vip":
            display: "<green>VIP Rank"
            condition: "%vault_hasgroup_VIP%"
            required-output: "yes"
        player-commands:
          - "say test"
          - "say test"
        console-commands:
          - "say test"
          - "say test"

This is the default CACTUS product settings. Check the table below for understanding every option.

Product Configuration Settings

sellable (boolean)

Toggles if the product is sellable or not.

unit-price (double)

Configures default unit price (price of just one product). This setting will be overridden by any existing level.

tax-price (double)

Configures default tax ratio (that'll be taken from the whole sell price). This setting will be overridden by any existing level.

Levels

You can define as many levels as you want. Below you can see every level option.

price

Price of upgrading to this level.

capacity

Maximum amount of this product that farmer can handle in this level.

player-commands

Commands that will be executed by player after upgrading to this level.

console-commands

Commands that will be executed by console after upgrading to this level.

requirements

Requirements are a way of conditioning levels. You can any PlaceholderAPI placeholder to check if the player has completed something you want related to anything in the server. Possibilities are almost endless using PlaceholderAPI's rich expansion cloud. You can define as many requirements as you want.

display (of a requirement)

This string will be displayed in the Upgrade GUI.

condition (of a requirement)

The PlaceholderAPI placeholder you want to check. Must start and end with %. You must use {} for inner placeholders.

required-output (of a requirement)

The output that given placeholder must return in order to requirement to pass. If returned output from given placeholder is not this, requirement will fail and player cannot upgrade to next level.

Clone this wiki locally