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.
- type: "customitem"
identifier: "explosive_arrow"
amount: 2
chance: 15.0
message:
type: "TITLE" # Can be CHAT, ACTION_BAR, or TITLE
text: "&c&lRARE ITEM!|&e+%amount% Explosive Arrows"
sound: "UI_TOAST_CHALLENGE_COMPLETE"
stone:
rewards:
- type: "money"
# The amount of money to give.
amount: 10.50
# The chance of this reward dropping (0.0 to 100.0).
chance: 5.0
diamond_ore:
rewards:
- type: "item"
# The item's Material ID (must be uppercase).
identifier: "DIAMOND"
# The number of items to give.
amount: 1
chance: 10.0
emerald_ore:
rewards:
- type: "customitem"
# The ID of your custom item from items.yml.
identifier: "power_crystal"
amount: 1
chance: 1.5
pig:
rewards:
- type: "itemsadder"
# The item's ID from ItemsAdder (namespace:id).
identifier: "pig_feet"
amount: 1
chance: 5.0
blaze:
rewards:
- type: "command"
# The command to execute. Placeholders will be replaced.
command: "broadcast %player% just defeated a powerful Blaze at %x%, %y%, %z%!"
chance: 100.0
zombie:
rewards:
- type: "exp"
# The amount of experience points to give.
amount: 10
chance: 50.0
witch:
rewards:
- type: "effect"
# Format: "EFFECT_TYPE DURATION_IN_SECONDS [AMPLIFIER]"
# This gives Regeneration II for 10 seconds.
effect: "REGENERATION 10 2"
chance: 20.0
creeper:
rewards:
# Reward 1: Money
- type: "money"
amount: 50.00
chance: 70.0
# Reward 2: Vanilla Item
- type: "item"
identifier: "GUNPOWDER"
amount: 4
chance: 100.0
# Reward 3: A rare custom item with its own special message
- type: "customitem"
identifier: "explosive_arrow"
amount: 2
chance: 15.0
message:
type: "TITLE"
text: "&c&lRARE ITEM!|&e+%amount% Explosive Arrows"
sound: "UI_TOAST_CHALLENGE_COMPLETE"
# Global effects that play if any of the rewards above are given
effects:
- "particle EXPLOSION_LARGE"
- "sound ENTITY_CREEPER_DEATH"