Repository navigation
Rarities
A rarity is a category for enchantments: Common, Rare, Legendary, Curse... It gives its enchantments a color for their name and a set of default numbers, so you do not have to repeat them in every file.
Rarities live in plugins/MetaEnchants/rarities.yml. Most changes to rarities need a server restart; book, minimum-table-level and the chances in obtain reload with /metaenchants reload. If neither the rarity nor the enchantment writes fishing, it follows the final loot value after merging.
rarities:
common:
name: "Common"
color: "<white>"
weight: 10
anvil-cost: 1
min-cost: { base: 1, per-level: 10 }
max-cost: { base: 21, per-level: 10 }
obtain: { enchanting-table: true, villagers: true, loot: true, fishing: true, mob-equipment: true, traded-equipment: true }
legendary:
name: "Legendary"
color: "<gold>"
weight: 1
anvil-cost: 8
min-cost: { base: 25, per-level: 25 }
max-cost: { base: 75, per-level: 25 }
treasure: true
obtain: { enchanting-table: false, villagers: 50%, loot: true, fishing: true, mob-equipment: false, traded-equipment: false }
book:
item:
material: ENCHANTED_BOOK
rarity: EPICThe id of a rarity (common, legendary) is what you write in an enchantment's rarity option. Menus list the last rarity written first, so the rarest ones usually appear first; /metaenchants list follows the order of the file.
| Option | Meaning |
|---|---|
name |
The visible name, like "Legendary". |
color |
The color tag applied to the names of its enchantments, like "<gold>" or "<#ff8800>". See Text and Colors. |
weight |
The default weight (1 to 1024). |
anvil-cost |
The default anvil cost. |
min-cost, max-cost
|
The default table costs. |
obtain |
Where its enchantments appear by default: true, false or a chance like 50%. See Where Enchantments Appear. |
treasure |
true makes its enchantments treasure by default: never in the table, double price in trades. |
minimum-table-level |
The enchanting table only gives its enchantments from this level cost. See Minimum table level. |
book |
How the books of its enchantments look and behave. See Enchanted Books. |
Every option is optional, and every enchantment can override any of them with its own value.
| Id | Name | Color | Weight | Treasure | Typical use |
|---|---|---|---|---|---|
common |
Common | white | 10 | no | Everyday enchantments. Found everywhere. |
uncommon |
Uncommon | green | 5 | no | |
rare |
Rare | aqua | 2 | no | Not on mobs' equipment. |
epic |
Epic | light purple | 1 | no | Very uncommon. Not on mobs' or traded equipment. |
legendary |
Legendary | gold | 1 | yes | Only in villagers (half of the times), loot and fishing. Its books have a purple name. |
curse |
Curse | red | 1 | yes | Only in villagers, loot and fishing. |
(You can rename them if you like, as long as every enchantment uses an id that exists.)
- Create a rarity for each "tier" of your server, and set the
obtain, weight and costs once there. - If you write a
rarityin an enchantment that does not exist, the console tells you and suggests the closest one. - If
rarities.ymlis missing or empty, the plugin uses a singlecommonrarity so it keeps working.