This is the most basic configuration. Lets break this down:
triggers - defines what action should trigger the collection to progress. In this case if someone breaks a block, then the collection will progress with dropped items. Here are the available triggers:
block_loot - triggered with the items when player breaks a block (also supports Oraxen 2.0 custom block drops and MMOItems custom block drops). Item API can be used here to check for other plugins custom items. (MythicMobs, Eco plugins, MMOItems, ExecutableItems, CustomFishing, Oraxen and many other plugins are supported for this)
player_kill - triggered when a player kills another player
entity_kill - triggered when a player kills an entity, eg a mob. (it supports MythicMobs with: mythicmobs:mobname and EcoMobs with: ecomobs:mob_id)
entity_loot - triggered with the items the killed entity will drop. (this also supports MythicMobs/MMOItems/Oraxen/CustomFishing item loot when a mythic mob dies)
entity_damage - triggered when a player damages a non-player entity (mob/animal) with the amount of damage being dealt. Note that the damage is floored to the nearest integer. The types field supports MythicMobs with: mythicmobs:mobname and EcoMobs with: ecomobs:mob_id
harvest - this is block loot but better for farming, since it has every right click harvestable crop and sugarcane/cactus etc also calculated properly. It would be best if you used this for every crop, like seeds, wheat, carrot, potato, pumpkin, melon, nether wart, etc
fish - triggered with the caught items when a player successfully catches something with a fishing rod (supports CustomFishing loot with customfishing:itemname, also supports every other item plugin mentioned above)
shear_loot - triggered when a player shears an entity
block_shear_loot - triggered when a player shears a block
villager_trade - triggered when trading with villagers
minion_loot - Currently only for BeeMinions and TopMinions integration.
name - Name of the collection. Will be used in menus.
requirements - Defines how many levels are there in the collection and what are the requirements for it. Here we have 7 levels. The first level will achieved when a user reaches 50 amount, the second when reaches 100, and so on.
use-global-level-matchers - Whether to use the global level matchers defined in the main configuration or not.
Complex example with custom rewards
triggers: [ block_loot, minion_loot ]
types:
- "minecraft:diamond"
- "minecraft:diamond_ore"
- "minecraft:deepslate_diamond_ore"
- "eco:ecoitems:enchanted_diamond"
# You can lock the collection behind a permission
# making it not progressable until the player have the permission.
permission: "my.permission"
# Since this is a diamond collection, but enchanted diamonds is actually
# made from 160 diamonds (5x32) you can set a multipler for it.
# This means when a collection would progress with 1 enchanted diamond
# it will count as 160.
multipliers:
- types: [ "eco:ecoitems:enchanted_diamond" ]
triggers: [ minion_loot ]
value: 160
- types: [ "eco:ecoitems:enchanted_diamond_block" ]
triggers: [ minion_loot ]
value: 320
name: "Diamond"
# To override menu title in the collection progression menu
menu-title: "Diamond menu title"
menu-item:
material: diamond
# These menu items will be added to the collection own menu
# where you see the levels.
custom-menu-items:
test:
material: cactus
name: "&aI'm an impostor"
slot: 1
requirements:
- 50
- 100
- 250
- 1000
- 2500
- 5000
- 10000
# If you set this to true then your global matchers
# will merge with the ones here.
# The ones here will override global ones if they
# have the same key
use-global-level-matchers: true
level-matchers:
# Override the default global matcher
default:
interval: 1
priority: 0
rewards:
my-money-reward:
type: money
formula: "1000 * {level_raw}^2 - 1000 * {level_raw} + 2000"
display: "&8+&a{value_formatted}$"
my-xp-reward:
type: levels_xp
formula: "ceil(5 + 5 * ({level_raw} - 1) * (log(1 + {level_raw}) / log(2)))"
display: "&8+&b{value_formatted} Global XP"
# You can also override/merge menu items here for the level when this is
# the best matcher (highest priority)
# This is optional
item:
completed-level:
material: green_stained_glass
on-click:
- "[console] say hi {player}"
locked-level:
on-click:
- "[console] say hi {player}"
next-level:
on-click:
- "[console] say hi {player}"
custom-levels:
my-custom-level:
level: 4
# Optional inheritance for rewards
inherits-from: [ default ]
rewards:
my-command-reward:
type: command
command: "give {player} someitem"
display: "&fYou will get some items"
my-other-custom-level:
level: 7
# Optional inheritance for rewards
inherits-from: [ default ]
rewards:
my-command-reward:
type: command
command: "give {player} someitem"
display: "&fYou will get some items"
# You can override/merge the menu item shown to run commands or
# actions when players click on it.
# You can also override the material here or anything.
# This is optional
item:
# generic level will be merged before the 3 other ones below to apply things
# to every variant. (NOTE: list type fields are using overrides instead of merge)
generic-level:
on-click:
- "[recipe] enchanted_carrot --- [player] collection progression farming carrot"
completed-level:
on-click:
- "[console] say hi {player}"
locked-level:
on-click:
- "[console] say hi {player}"
next-level:
on-click:
- "[console] say hi {player}"
types - These are the types that are makes sense for the used triggers. Here we use bukkit names with the minecraft namespace since these are vanilla items. Every supported plugin items can be used here with the proper namespace. (MythicMobs, Eco plugins, MMOItems, ExecutableItems, CustomFishing, Oraxen and many other plugins are supported for this)
menu-item - This defines what the collection should look like in the menus. By default, in the other menu configuration file you can specify item templates that will be used here if enabled. Otherwise, you can use everything from .