EnchantLevel

sealed interface EnchantLevel

A parsed enchantment level: either an explicit positive Explicit.level or the max keyword (Max), which resolves to the enchantment's highest level.

Inheritors

Types

Link copied to clipboard
data class Explicit(val level: Int) : EnchantLevel, Record

An explicit positive level, used as-is (may exceed the enchantment's max).

Link copied to clipboard
data object Max : EnchantLevel

The enchantment's highest level; always resolves through the holder at use time.

Functions

Link copied to clipboard

Renders this parsed level for the command result message: max stays the keyword, an explicit level prints as its number.