Script API - v1.19.70
    Preparing search index...

    This class represents a collection of enchantments that can be applied to an item.

    Implements

    Index

    Constructors

    • Beta

      Parameters

      • enchantmentSlot: number

      Returns EnchantmentList

      Creates a new EnchantmentList.

    Properties

    slot: number

    The item slot/type that this collection is applied to.

    Methods

    • Beta

      Parameters

      Returns boolean

      Attempts to add the enchantment to this collection. Returns true if successful.

    • Beta

      Parameters

      Returns boolean

      Returns whether or not the provided EnchantmentInstance can be added to this collection.

    • Beta

      Parameters

      Returns number

      If this collection has an EnchantmentInstance with type, returns the level of the enchantment. Returns 0 if not present.

    • Beta

      Parameters

      Returns void

      Removes an EnchantmentInstance with type from this collection if present.