Interface ItemEnchantments
- All Superinterfaces:
ShownInTooltip<ItemEnchantments>
@NullMarked
@Experimental
@NonExtendable
public interface ItemEnchantments
extends ShownInTooltip<ItemEnchantments>
Stores a list of enchantments and their levels on an item.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription@Unmodifiable Map
<Enchantment, @IntRange(from=1L,to=255L) Integer> Enchantments currently present on this item.static ItemEnchantments.Builder
static ItemEnchantments
itemEnchantments
(Map<Enchantment, @IntRange(from=1L,to=255L) Integer> enchantments, boolean showInTooltip) Methods inherited from interface io.papermc.paper.datacomponent.item.ShownInTooltip
showInTooltip, showInTooltip
-
Method Details
-
itemEnchantments
@Contract(value="_, _ -> new", pure=true) static ItemEnchantments itemEnchantments(Map<Enchantment, @IntRange(from=1L,to=255L) Integer> enchantments, boolean showInTooltip) -
itemEnchantments
-
enchantments
@Contract(pure=true) @Unmodifiable Map<Enchantment,@IntRange(from=1L,to=255L) Integer> enchantments()Enchantments currently present on this item.- Returns:
- enchantments
-