-
Notifications
You must be signed in to change notification settings - Fork 7
Reward Profiles
Reward profiles define what happens when an item reaches a specific level. Rewards can include enchantments, commands, and attribute modifications.
plugins/LevelTools/reward_profiles.yml
profiles:
profile_id:
levels:
1:
- "enchant2 efficiency 1"
5:
- "enchant2 efficiency 2"
- "command broadcast {player} reached level 5!"
10:
- "enchant2 efficiency 3"
- "attribute generic.attack_speed 0.5"Each reward line follows the format: handler argument1 argument2 ...
Adds an enchantment, overriding the existing level.
- "enchant efficiency 3"If the item has Efficiency 5, it will become Efficiency 3.
Adds an enchantment only if the new level is higher than existing.
- "enchant2 efficiency 3"If the item has Efficiency 5, nothing happens. If it has Efficiency 2, it becomes Efficiency 3.
Recommended for most use cases to prevent accidental downgrades.
Adds to the existing enchantment level.
- "enchant3 efficiency 1"If the item has Efficiency 2, it becomes Efficiency 3.
Runs a command as console.
- "command give {player} diamond 1"
- "command broadcast {player} leveled up their tool!"Placeholders:
-
{player}(or%player%) - Player name
Only
{player}/%player%is substituted forcommand,player-command, andplayer-opcommand.{level}and{item}are not replaced — those values are only known to theenchant*andattributehandlers via the YAML level key.
Runs a command as the player. Same placeholder rules as command.
- "player-command spawn"Runs a command as the player with temporary OP permissions. Same placeholder rules as command.
- "player-opcommand specialplugin enchant"Use with caution. The OP permission is removed immediately after execution.
Modifies an item attribute.
- "attribute generic.attack_speed 0.5"
- "attribute generic.attack_damage 2"See Attribute Reference for valid attributes.
The plugin ships with seven reward profiles: tools, swords, bows, crossbows, fishing_rods, tridents, and hoes. See reward_profiles.yml for the full level table of each.
Used by pickaxes, axes, and shovels. See reward_profiles.yml for the full level table.
Used by swords. See reward_profiles.yml for the full level table.
Used by bows. See reward_profiles.yml for the full level table.
Used by crossbows. See reward_profiles.yml for the full level table.
Used by fishing rods. See reward_profiles.yml for the full level table.
Used by tridents. See reward_profiles.yml for the full level table.
Used by hoes. See reward_profiles.yml for the full level table.
Example: Combat tool with attribute bonuses
profiles:
elite_swords:
levels:
1:
- "enchant2 sharpness 1"
10:
- "enchant2 sharpness 5"
- "attribute generic.attack_speed 0.2"
25:
- "enchant2 fire_aspect 2"
- "command broadcast &6{player} &eunlocked &cFire Aspect&e!"
50:
- "enchant2 sharpness 7"
- "attribute generic.attack_damage 2"
- "command give {player} experience_bottle 10"