Private
constructorReadonly
isReturns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.
This property can't be read in early-execution mode.
Readonly
slotsThis property can't be read in early-execution mode.
Readonly
typeThis property can't be read in early-execution mode.
Static
Readonly
componentThe enchantment interface to be added.
This function can't be called in read-only mode.
ScriptItemEnchantmentUnknownIdError: Exception thrown if the enchantment type does not exist.
ScriptItemEnchantmentLevelOutOfBoundsError: Exception thrown if the enchantment level is outside the allowable range for the given enchantment type.
ScriptItemEnchantmentTypeNotCompatibleError: Exception thrown if the enchantment is not compatible with the item stack.
EnchantmentLevelOutOfBoundsError
EnchantmentTypeNotCompatibleError
Error
This function can't be called in early-execution mode.
The list of enchantments to be added.
This function can't be called in read-only mode.
ScriptItemEnchantmentUnknownIdError: Exception thrown if any enchantment type does not exist.
ScriptItemEnchantmentLevelOutOfBoundsError: Exception thrown if any enchantment level is outside the allowable range for the given enchantment type.
ScriptItemEnchantmentTypeNotCompatibleError: Exception thrown if any enchantment is not compatible with the item stack.
EnchantmentLevelOutOfBoundsError
EnchantmentTypeNotCompatibleError
Error
This function can't be called in early-execution mode.
The enchantment interface to be added.
Returns true if the enchantment can be added to the item stack.
ScriptItemEnchantmentUnknownIdError: Exception thrown if the enchantment type does not exist.
ScriptItemEnchantmentLevelOutOfBoundsError: Exception thrown if the enchantment level is outside the allowable range for the given enchantment type.
This function can't be called in early-execution mode.
The enchantment type to get.
Returns the enchantment if it exists on the item stack.
This function can't be called in early-execution mode.
Returns a list of enchantments on the item stack.
This function can't be called in early-execution mode.
The enchantment type to check for.
Returns true if the item stack has the enchantment type.
This function can't be called in early-execution mode.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
The enchantment type to remove.
This function can't be called in read-only mode.
ScriptItemEnchantmentUnknownIdError: Exception thrown if the enchantment type does not exist.
Error
This function can't be called in early-execution mode.
When present on an item, this item can have enchantments applied to it.