gearRewards

This is the core file of CatzUtils where you define all possible rewards. This guide explains how to structure rewards for different actions and details every reward type available.

General Structure

The file is organized into main categories based on the action that triggers the reward. Each category holds specific triggers (like a mob name or a block type).

  • reward-mobs: For rewards from killing mobs.

  • reward-blocks: For rewards from breaking blocks.

  • reward-fishing: For rewards from fishing.

  • reward-player-kill: For rewards from killing other players.

Reward Group Breakdown

Under each category, you define a "reward group" for a specific trigger (e.g., zombie, diamond_ore). Each group contains a list of potential rewards and an optional list of effects.

Example:

zombie:
  rewards:
    - type: "money"
      amount: 25.50
      chance: 75.0
    - type: "item"
      identifier: "ROTTEN_FLESH"
      amount: 2
      chance: 100.0
  # (Optional) A list of visual/audio effects to play when ANY reward is given.
  effects:
    - "particle FLAME"
    - "sound ENTITY_ZOMBIE_DEATH"

Reward Types

This is the most powerful feature of rewards.yml. The type key determines what kind of reward is given.

Type
Required Keys
Description

money

amount, chance

Gives the player a specified amount of money. Requires Vault.

item

identifier, amount, chance

Gives a vanilla Minecraft item. The identifier must be a valid Material name (e.g., DIAMOND).

customitem

identifier, amount, chance

Gives a custom item defined in your items.yml file. The identifier is the key from that file (e.g., gold_coin).

itemsadder

identifier, amount, chance

Gives a custom item from ItemsAdder. The identifier is the item's ID from ItemsAdder.

oraxen

identifier, amount, chance

Gives a custom item from Oraxen. The identifier is the item's ID from Oraxen.

nexo

identifier, amount, chance

Gives a custom item from Nexo. The identifier is the item's ID from Nexo.

command

command, chance

Executes a console command. You can use placeholders like %player%, %mob%, %block%, etc..

exp

amount, chance

Gives the player a specified amount of experience points.

effect

effect, chance

Gives the player a potion effect. The format is "EFFECT_TYPE DURATION_SECONDS [AMPLIFIER]" (e.g., "REGENERATION 10 2").

Custom Reward Messages

You can add an optional message section inside any individual reward to override the default message for that specific reward.

Example:

Detailed Reward Examples

Below are examples for each reward type to help you understand how to configure them.

Money Reward (money)

Gives the player money via Vault.

Vanilla Item Reward (item)

Gives the player a standard Minecraft item.

Custom Item Reward (customitem)

Gives a custom item that you have defined in items.yml.

Item Plugin Reward (itemsadder, oraxen, nexo)

Gives a custom item from a supported plugin.

Command Reward (command)

Executes a command from the console. Placeholders are very powerful here.

Experience Points Reward (exp)

Gives the player EXP points.

Potion Effect Reward (effect)

Applies a potion effect to the player.

Complex Example (Multiple Rewards & Custom Message)

You can assign multiple, different reward types to a single action. Each reward is rolled independently based on its own chance.

Last updated