Pular para o conteúdo principal

Give Enchantment Book

Give a book with a custom enchantment

Campos

CampoTipoPadrãoDescrição
enchantmentRef<EnchantmentDefinition>—Standard enchantment to apply on the book
EnchantmentDefinition (18)
CampoTipoPadrãoDescrição
displayNameString—Display name of the enchantment
enchantmentLoreString—Lore shown on items for this enchantment
nameColorStringgrayColor of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa')
supportedItemsList<Material>emptyItems that support this enchantment
anvilCostInt1Cost in an anvil to combine
maxLevelInt1Maximum level of the enchantment
weightInt1Weight used for random selection
minimumCostCost—Minimum cost when enchanting
Cost (2)
CampoTipoPadrãoDescrição
baseInt0—
perLevelInt0—
maximumCostCost—Maximum cost when enchanting
Cost (2)
CampoTipoPadrãoDescrição
baseInt0—
perLevelInt0—
activeSlotsList<EnchantSlot>emptyEquipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY
exclusiveWithList<Ref<RegisteredEnchantment>>emptyEnchantments that cannot coexist with this one on the same itemVariantes:CustomEnchantmentDefinitionEnchantmentDefinition
CustomEnchantmentDefinition (14)
CampoTipoPadrãoDescrição
displayNameString—Display name of the enchantment
enchantmentLoreString—Lore shown on items for this enchantment
nameColorStringgrayColor of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa')
supportedItemsList<Material>emptyItems that support this enchantment
anvilCostInt1Cost in an anvil to combine
maxLevelInt1Maximum level of the enchantment
weightInt1Weight used for random selection
minimumCostEnchantmentDefinition.Cost—Minimum cost when enchanting
maximumCostEnchantmentDefinition.Cost—Maximum cost when enchanting
activeSlotsList<EnchantSlot>emptyEquipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY
exclusiveWithList<Ref<RegisteredEnchantment>>emptyEnchantments that cannot coexist with this one on the same item
treasureChanceInt0Chance (0-100%) for this enchantment to appear as a book in generated loot chests
tradeChanceInt0Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade
mechanicsList<EnchantmentMechanic>emptyList of modular mechanics for this enchantment
EnchantmentDefinition (18)
CampoTipoPadrãoDescrição
displayNameString—Display name of the enchantment
enchantmentLoreString—Lore shown on items for this enchantment
nameColorStringgrayColor of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa')
supportedItemsList<Material>emptyItems that support this enchantment
anvilCostInt1Cost in an anvil to combine
maxLevelInt1Maximum level of the enchantment
weightInt1Weight used for random selection
minimumCostCost—Minimum cost when enchanting
maximumCostCost—Maximum cost when enchanting
activeSlotsList<EnchantSlot>emptyEquipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY
exclusiveWithList<Ref<RegisteredEnchantment>>emptyEnchantments that cannot coexist with this one on the same item
treasureChanceInt0Chance (0-100%) for this enchantment to appear as a book in generated loot chests
tradeChanceInt0Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade
cooldownEnabledBooleantrueWhether active triggers use a cooldown
cooldownDurationofSeconds(1)Cooldown between active triggers
criteriaList<Criteria>emptyCriteria that must match for triggers to run
inactiveTriggersList<Ref<TriggerableEntry>>emptyTriggers fired when the enchantment becomes inactive
activeTriggersList<ActiveTriggers>emptyTriggers fired while the enchantment is active. Each entry specifies the level.
treasureChanceInt0Chance (0-100%) for this enchantment to appear as a book in generated loot chests
tradeChanceInt0Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade
cooldownEnabledBooleantrueWhether active triggers use a cooldown
cooldownDurationofSeconds(1)Cooldown between active triggers
criteriaList<Criteria>emptyCriteria that must match for triggers to run
inactiveTriggersList<Ref<TriggerableEntry>>emptyTriggers fired when the enchantment becomes inactive
activeTriggersList<ActiveTriggers>emptyTriggers fired while the enchantment is active. Each entry specifies the level.
ActiveTriggers (2)
CampoTipoPadrãoDescrição
levelInt1—
triggersList<Ref<TriggerableEntry>>empty—
customEnchantmentRef<CustomEnchantmentDefinition>—Custom enchantment to apply on the book (takes priority if both are set)
CustomEnchantmentDefinition (14)
CampoTipoPadrãoDescrição
displayNameString—Display name of the enchantment
enchantmentLoreString—Lore shown on items for this enchantment
nameColorStringgrayColor of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa')
supportedItemsList<Material>emptyItems that support this enchantment
anvilCostInt1Cost in an anvil to combine
maxLevelInt1Maximum level of the enchantment
weightInt1Weight used for random selection
minimumCostEnchantmentDefinition.Cost—Minimum cost when enchanting
EnchantmentDefinition (18)
CampoTipoPadrãoDescrição
displayNameString—Display name of the enchantment
enchantmentLoreString—Lore shown on items for this enchantment
nameColorStringgrayColor of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa')
supportedItemsList<Material>emptyItems that support this enchantment
anvilCostInt1Cost in an anvil to combine
maxLevelInt1Maximum level of the enchantment
weightInt1Weight used for random selection
minimumCostCost—Minimum cost when enchanting
maximumCostCost—Maximum cost when enchanting
activeSlotsList<EnchantSlot>emptyEquipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY
exclusiveWithList<Ref<RegisteredEnchantment>>emptyEnchantments that cannot coexist with this one on the same item
treasureChanceInt0Chance (0-100%) for this enchantment to appear as a book in generated loot chests
tradeChanceInt0Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade
cooldownEnabledBooleantrueWhether active triggers use a cooldown
cooldownDurationofSeconds(1)Cooldown between active triggers
criteriaList<Criteria>emptyCriteria that must match for triggers to run
inactiveTriggersList<Ref<TriggerableEntry>>emptyTriggers fired when the enchantment becomes inactive
activeTriggersList<ActiveTriggers>emptyTriggers fired while the enchantment is active. Each entry specifies the level.
maximumCostEnchantmentDefinition.Cost—Maximum cost when enchanting
EnchantmentDefinition (18)
CampoTipoPadrãoDescrição
displayNameString—Display name of the enchantment
enchantmentLoreString—Lore shown on items for this enchantment
nameColorStringgrayColor of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa')
supportedItemsList<Material>emptyItems that support this enchantment
anvilCostInt1Cost in an anvil to combine
maxLevelInt1Maximum level of the enchantment
weightInt1Weight used for random selection
minimumCostCost—Minimum cost when enchanting
maximumCostCost—Maximum cost when enchanting
activeSlotsList<EnchantSlot>emptyEquipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY
exclusiveWithList<Ref<RegisteredEnchantment>>emptyEnchantments that cannot coexist with this one on the same item
treasureChanceInt0Chance (0-100%) for this enchantment to appear as a book in generated loot chests
tradeChanceInt0Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade
cooldownEnabledBooleantrueWhether active triggers use a cooldown
cooldownDurationofSeconds(1)Cooldown between active triggers
criteriaList<Criteria>emptyCriteria that must match for triggers to run
inactiveTriggersList<Ref<TriggerableEntry>>emptyTriggers fired when the enchantment becomes inactive
activeTriggersList<ActiveTriggers>emptyTriggers fired while the enchantment is active. Each entry specifies the level.
activeSlotsList<EnchantSlot>emptyEquipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY
exclusiveWithList<Ref<RegisteredEnchantment>>emptyEnchantments that cannot coexist with this one on the same itemVariantes:CustomEnchantmentDefinitionEnchantmentDefinition
CustomEnchantmentDefinition (14)
CampoTipoPadrãoDescrição
displayNameString—Display name of the enchantment
enchantmentLoreString—Lore shown on items for this enchantment
nameColorStringgrayColor of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa')
supportedItemsList<Material>emptyItems that support this enchantment
anvilCostInt1Cost in an anvil to combine
maxLevelInt1Maximum level of the enchantment
weightInt1Weight used for random selection
minimumCostEnchantmentDefinition.Cost—Minimum cost when enchanting
maximumCostEnchantmentDefinition.Cost—Maximum cost when enchanting
activeSlotsList<EnchantSlot>emptyEquipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY
exclusiveWithList<Ref<RegisteredEnchantment>>emptyEnchantments that cannot coexist with this one on the same item
treasureChanceInt0Chance (0-100%) for this enchantment to appear as a book in generated loot chests
tradeChanceInt0Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade
mechanicsList<EnchantmentMechanic>emptyList of modular mechanics for this enchantment
EnchantmentDefinition (18)
CampoTipoPadrãoDescrição
displayNameString—Display name of the enchantment
enchantmentLoreString—Lore shown on items for this enchantment
nameColorStringgrayColor of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa')
supportedItemsList<Material>emptyItems that support this enchantment
anvilCostInt1Cost in an anvil to combine
maxLevelInt1Maximum level of the enchantment
weightInt1Weight used for random selection
minimumCostCost—Minimum cost when enchanting
maximumCostCost—Maximum cost when enchanting
activeSlotsList<EnchantSlot>emptyEquipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY
exclusiveWithList<Ref<RegisteredEnchantment>>emptyEnchantments that cannot coexist with this one on the same item
treasureChanceInt0Chance (0-100%) for this enchantment to appear as a book in generated loot chests
tradeChanceInt0Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade
cooldownEnabledBooleantrueWhether active triggers use a cooldown
cooldownDurationofSeconds(1)Cooldown between active triggers
criteriaList<Criteria>emptyCriteria that must match for triggers to run
inactiveTriggersList<Ref<TriggerableEntry>>emptyTriggers fired when the enchantment becomes inactive
activeTriggersList<ActiveTriggers>emptyTriggers fired while the enchantment is active. Each entry specifies the level.
treasureChanceInt0Chance (0-100%) for this enchantment to appear as a book in generated loot chests
tradeChanceInt0Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade
mechanicsList<EnchantmentMechanic>emptyList of modular mechanics for this enchantment
EnchantmentMechanic (6)
CampoTipoPadrãoDescrição
eventEnchantmentEventPLAYER_ATTACKThe event that triggers this mechanicValores:PLAYER_ATTACKPLAYER_DEFENDBLOCK_BREAKBOW_SHOOTPROJECTILE_HITITEM_CONSUMEPLAYER_DEATHPLAYER_INTERACTARMOR_EQUIPITEM_DAMAGEFALL_DAMAGEENVIRONMENTAL_DAMAGEPLAYER_MOVESHIELD_BLOCKSNEAKSPRINT
criteriaList<Criteria>emptyConditions that must be met to execute the actions
actionsList<Ref<TriggerableEntry>>emptyActions executed when criteria are met
clientSideEffectsList<Ref<TriggerableEntry>>emptyClient-side only effects (particles, sounds) executed via packets
runOnLevelInt0Level required to run this mechanic. 0 means all levels.
chanceInt100Chance to trigger this mechanic (0-100%).
levelInt1Level of the enchantment
amountInt1Amount of books to give
bookNameString{enchantment} {level}Display name of the book. {enchantment} and {level} placeholders are supported
enchantmentLoreList<String>—Lore line showing the enchantment. Supports color codes and {enchantment_lore}/{level} placeholders
bookLoreList<String>emptyAdditional lore for the book. Supports color codes and {enchantment}/{level} placeholders
Campos comuns do TypeWriter (criteria, modifiers, triggers)
CampoTipoPadrãoDescrição
criteriaList<Criteria>empty—
modifiersList<Modifier>empty—
triggersList<Ref<TriggerableEntry>>empty—

How to use it​

Select the definition in enchantment (standard) or in customEnchantment (this one wins when both are set), then set level and amount. The book is an enchanted book with the enchantment stored on it.

  • bookName is the title of the book. {enchantment} is the display name and {level} the level in roman numerals.
  • enchantmentLore is a list of lines shown in the enchantment color. They accept {enchantment_lore} (the definition's enchantmentLore, or its display name when empty) and {level}.
  • bookLore adds extra lines. Placeholders from PlaceholderAPI are supported in all texts.

If the inventory is full, the books are dropped at the player's feet.