Mathematical Expressions
Basic Syntax
give %player% diamond {math:2 + (%player_level% / 10)} Chance Expressions
give %player% diamond 1 {math:10 + (%player_level% * 2)}%Configuration Example
zombie:
id: zombie_reward
type: ZOMBIE
name: "Rotting Zombie"
minimumDamagePercent: 5.0
radius: 50
cooldown: 60
cooldownType: MINUTES
allRewards:
- "give %player% minecraft:coal 5"
- "give %player% minecraft:diamond 1 50.0%" # Fixed chance value
- "give %player% minecraft:emerald 2 {math:20 + (%player_level% / 10)}%" # Dynamic chance
rewards:
1: # Most damage player
- "give %player% minecraft:diamond 3"
- "give %player% minecraft:netherite_ingot 1 {math:10 + (%player_level% / 100)}%"
2: # Second most damage player
- "give %player% minecraft:iron_ingot 5"
- "give %player% minecraft:diamond 1 25.0%"
lastHitRewards: # Last hit player
- "give %player% minecraft:experience_bottle 5"
- "give %player% minecraft:diamond 3 {math:%player_level% * 5}%"Available Variables
Supported Operations
Example Uses
Error Handling
Practical Tips
Last updated