Skip to content

Tooltips

neoramm edited this page Nov 5, 2026 · 1 revision

Tooltips: How Enchantments Look on Items

When a player hovers an enchanted item, the game shows a box with its name and its enchantments. That box is the tooltip. MetaEnchants can make it much more useful:

Diamond Sword
Vampirism III
 Restores health based on the
 damage you deal to enemies.
Sharpness V
 Extra damage.

Each enchantment gets its description under its name, levels above X are written as Roman numerals (no more enchantment.level.11), and the list can be sorted and shortened when an item has many enchantments.

All of this is set in the tooltip section of config.yml, and changes with /metaenchants reload.

The most important thing: the items are not changed

MetaEnchants does not write anything into your items. It only changes what each player sees, at the moment the server sends the item to them.

That means:

  • Turning the tooltips off (enabled: false) instantly brings back the vanilla look on every item, old and new.
  • Items keep stacking, trading and working with other plugins exactly as before.
  • Players in creative mode can take items out of the creative inventory and the extra lines are removed before the server receives them.

Turning it on and off

tooltip:
  enabled: true
  vanilla: true
Option What it does
enabled false shows the vanilla tooltip everywhere.
vanilla true also formats items that only have vanilla enchantments (Sharpness, Mending...). false leaves those items alone; items with at least one MetaEnchants enchantment are still formatted.

Each line

tooltip:
  numerals: true
  format: "%name% %level%"
  single-level-format: "%name%"
  above-max-format: "%name% <gold>%level%"
Option Used for Example result
format Normal levels. Vampirism III
single-level-format Enchantments whose maximum level is 1, like Mending. Mending
above-max-format Levels above the maximum, given with /forceenchant. Vampirism XII, with the level in gold

In each one, %name% is the name of the enchantment, already in the color of its rarity (vanilla enchantments are gray, curses red), and %level% is the level.

numerals: true writes levels as I, II, III... up to 3999. false writes 1, 2, 3...

Descriptions

tooltip:
  descriptions:
    enabled: true
    format: "<dark_gray> %line%"
    limit: 6
    player-toggle: true
Option What it does
enabled Shows the description of each enchantment under its name.
format How each line looks. %line% is the line of the description.
limit Items with more enchantments than this show no descriptions, so long lists stay readable. 0 always shows them.
player-toggle Lets each player hide descriptions for themselves with /metaenchants descriptions (and show them again with the same command).

The descriptions come from the description of each enchantment file. Vanilla enchantments can get one in vanilla.yml.

A different description for each level

A description can change with the level. Instead of a list, write the level where each text starts:

description:
  1:
    - "<gray>Fells up to 10 logs per level."
  3:
    - "<gray>Fells the whole tree, leaves included."

Levels 1 and 2 show the first text; level 3 and higher show the second. Each text is used from its level upwards, until the next one starts. The menus show the text of the maximum level.

Inside a description, %level% is replaced by the level as a number, so "<gray>Heals %level% hearts." reads Heals 3 hearts. at level 3. In the menus it is the maximum level.

Order

tooltip:
  sort: rarity
Value Order
none As stored on the item.
rarity MetaEnchants enchantments first, the rarest at the top; then vanilla ones.
type By type, in the order of types.yml.
name Alphabetical.
length Shortest names first.

Curses always go last, whatever the order.

Items with many enchantments

tooltip:
  collapse:
    above: 10
    per-line: 3
    separator: "<gray>, "

When an item has more than above enchantments, the tooltip only shows their names, per-line on each line, joined with separator:

Sharpness I, Unbreaking I, Looting I
Fire Aspect I, Knockback I, Mending
...

above: 0 never collapses.

Enchanted books

Books get two extra kinds of lines:

tooltip:
  book-lines:
    - "<dark_gray> Applies to: <gray>%applies_to%"
  rate-lines:
    - "<green>%success%% success rate"
    - "<red>%destroy%% destroy rate"
  • book-lines go under each enchantment of the book. %applies_to% is the list of items it goes on, %max_level% its maximum level and %type% its type.
  • rate-lines go once at the end, only on books that have success and destroy rates.

%applies_to% is made from supported-items (#minecraft:swords becomes Swords). Write your own text with applies-to in the enchantment file:

applies-to: "Swords and axes"

Write book-lines: [] to show nothing.

Items that hide their enchantments

If an item already hides its enchantments (for example, an item from another plugin with hide: [enchantments]), MetaEnchants leaves its tooltip alone. The same happens with the icons of the MetaEnchants menus, which have their own text.

In short

  • The look changes, the items do not.
  • tooltip.enabled: false brings back vanilla.
  • Descriptions, numerals, order, collapsing and book lines are all in tooltip.
  • Descriptions can change with the level.
  • Players can hide descriptions with /metaenchants descriptions.

Clone this wiki locally