Item Rarity

A rarity is a category you attach to items to show how good or rare they are: each rarity adds a lore tag, has a weight that breaks ties, and can claim a list of items. This page covers creating a rarity and turning the system on.

Quick start

  1. Enable the rarity system: set rarity.enabled: true in /plugins/EcoItems/config.yml (see Plugin Config).

  2. Open the /plugins/EcoItems/rarities/ folder.

  3. Copy _example.yml and rename it to your rarity's ID, e.g. legendary.yml.

  4. Set the lore, weight, and any items the rarity should apply to.

  5. Run /ecoitems reload.

  6. Give yourself an item using that rarity and confirm the rarity lore tag appears.

Naming and IDs

The file name without .yml is the rarity's ID. That ID is what you put in an item's rarity: field and in the Item Lookup System, so legendary.yml has the ID legendary.

The structure of a rarity

PartWhat it controls
LoreThe lore tag added to items of this rarity
WeightWhich rarity wins when an item matches more than one
ItemsThe non-EcoItems items that should get this rarity
# === Lore: the tag shown on the item ===
lore:
  - "&a&lCOMMON" # One lore line per entry, added to the item

# === Weight: tie-breaking ===
weight: 1 # Higher weight wins when an item matches multiple rarities

# === Items: what gets this rarity ===
items: # Items from the Item Lookup System; EcoItems should set rarity in their own config instead
  - diamond

Lore

The lore list is the tag appended to every item of this rarity. Each entry is one line of lore and supports colour codes.

lore:
  - "&a&lCOMMON" # One lore line per entry, added to the item

Weight

An item can match more than one rarity. weight decides which one is shown: the highest weight wins.

weight: 1 # Higher weight wins when an item matches multiple rarities

Items

The items list assigns this rarity to vanilla or other looked-up items. EcoItems should set their rarity in their own config with the rarity: field rather than being listed here.

items: # Items from the Item Lookup System
  - diamond

Where to go next

  • Plugin settings: Plugin Config for the global rarity options like the default rarity.

  • Make an item: How to make an Item to set a rarity: on your own items.