Give Enchantment Book
Give a book with a custom enchantment
フィールド
| フィールド | 型 | デフォルト | 説明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enchantment | Ref<EnchantmentDefinition> | — | Standard enchantment to apply on the book
|
| フィールド | 型 | デフォルト | 説明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
displayName | String | — | Display name of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enchantmentLore | String | — | Lore shown on items for this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
supportedItems | List<Material> | empty | Items that support this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
anvilCost | Int | 1 | Cost in an anvil to combine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxLevel | Int | 1 | Maximum level of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weight | Int | 1 | Weight used for random selection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minimumCost | Cost | — | Minimum cost when enchanting
|
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
base | Int | 0 | — |
perLevel | Int | 0 | — |
maximumCostCostCost(2)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
base | Int | 0 | — |
perLevel | Int | 0 | — |
activeSlotsList<EnchantSlot>emptyANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODYexclusiveWithList<Ref<RegisteredEnchantment>>emptyCustomEnchantmentDefinitionEnchantmentDefinitionCustomEnchantmentDefinition(14)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | EnchantmentDefinition.Cost | — | Minimum cost when enchanting |
maximumCost | EnchantmentDefinition.Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)値:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
mechanics | List<EnchantmentMechanic> | empty | List of modular mechanics for this enchantment |
EnchantmentDefinition(18)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | Cost | — | Minimum cost when enchanting |
maximumCost | Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)値:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
cooldownEnabled | Boolean | true | Whether active triggers use a cooldown |
cooldown | Duration | ofSeconds(1) | Cooldown between active triggers |
criteria | List<Criteria> | empty | Criteria that must match for triggers to run |
inactiveTriggers | List<Ref<TriggerableEntry>> | empty | Triggers fired when the enchantment becomes inactive |
activeTriggers | List<ActiveTriggers> | empty | Triggers fired while the enchantment is active. Each entry specifies the level. |
treasureChanceInt0tradeChanceInt0cooldownEnabledBooleantruecooldownDurationofSeconds(1)criteriaList<Criteria>emptyinactiveTriggersList<Ref<TriggerableEntry>>emptyactiveTriggersList<ActiveTriggers>emptyActiveTriggers(2)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
level | Int | 1 | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
customEnchantmentRef<CustomEnchantmentDefinition>CustomEnchantmentDefinition(14)
| フィールド | 型 | デフォルト | 説明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
displayName | String | — | Display name of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enchantmentLore | String | — | Lore shown on items for this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
supportedItems | List<Material> | empty | Items that support this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
anvilCost | Int | 1 | Cost in an anvil to combine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxLevel | Int | 1 | Maximum level of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weight | Int | 1 | Weight used for random selection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minimumCost | EnchantmentDefinition.Cost | — | Minimum cost when enchanting
|
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | Cost | — | Minimum cost when enchanting |
maximumCost | Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)値:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
cooldownEnabled | Boolean | true | Whether active triggers use a cooldown |
cooldown | Duration | ofSeconds(1) | Cooldown between active triggers |
criteria | List<Criteria> | empty | Criteria that must match for triggers to run |
inactiveTriggers | List<Ref<TriggerableEntry>> | empty | Triggers fired when the enchantment becomes inactive |
activeTriggers | List<ActiveTriggers> | empty | Triggers fired while the enchantment is active. Each entry specifies the level. |
maximumCostEnchantmentDefinition.CostEnchantmentDefinition(18)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | Cost | — | Minimum cost when enchanting |
maximumCost | Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)値:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
cooldownEnabled | Boolean | true | Whether active triggers use a cooldown |
cooldown | Duration | ofSeconds(1) | Cooldown between active triggers |
criteria | List<Criteria> | empty | Criteria that must match for triggers to run |
inactiveTriggers | List<Ref<TriggerableEntry>> | empty | Triggers fired when the enchantment becomes inactive |
activeTriggers | List<ActiveTriggers> | empty | Triggers fired while the enchantment is active. Each entry specifies the level. |
activeSlotsList<EnchantSlot>emptyANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODYexclusiveWithList<Ref<RegisteredEnchantment>>emptyCustomEnchantmentDefinitionEnchantmentDefinitionCustomEnchantmentDefinition(14)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | EnchantmentDefinition.Cost | — | Minimum cost when enchanting |
maximumCost | EnchantmentDefinition.Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)値:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
mechanics | List<EnchantmentMechanic> | empty | List of modular mechanics for this enchantment |
EnchantmentDefinition(18)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | Cost | — | Minimum cost when enchanting |
maximumCost | Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)値:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
cooldownEnabled | Boolean | true | Whether active triggers use a cooldown |
cooldown | Duration | ofSeconds(1) | Cooldown between active triggers |
criteria | List<Criteria> | empty | Criteria that must match for triggers to run |
inactiveTriggers | List<Ref<TriggerableEntry>> | empty | Triggers fired when the enchantment becomes inactive |
activeTriggers | List<ActiveTriggers> | empty | Triggers fired while the enchantment is active. Each entry specifies the level. |
treasureChanceInt0tradeChanceInt0mechanicsList<EnchantmentMechanic>emptyEnchantmentMechanic(6)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
event | EnchantmentEvent | PLAYER_ATTACK | The event that triggers this mechanic値:PLAYER_ATTACKPLAYER_DEFENDBLOCK_BREAKBOW_SHOOTPROJECTILE_HITITEM_CONSUMEPLAYER_DEATHPLAYER_INTERACTARMOR_EQUIPITEM_DAMAGEFALL_DAMAGEENVIRONMENTAL_DAMAGEPLAYER_MOVESHIELD_BLOCKSNEAKSPRINT |
criteria | List<Criteria> | empty | Conditions that must be met to execute the actions |
actions | List<Ref<TriggerableEntry>> | empty | Actions executed when criteria are met |
clientSideEffects | List<Ref<TriggerableEntry>> | empty | Client-side only effects (particles, sounds) executed via packets |
runOnLevel | Int | 0 | Level required to run this mechanic. 0 means all levels. |
chance | Int | 100 | Chance to trigger this mechanic (0-100%). |
levelInt1amountInt1bookNameString{enchantment} {level}enchantmentLoreList<String>bookLoreList<String>emptyTypeWriter 共通フィールド(criteria, modifiers, triggers)
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
criteria | List<Criteria> | empty | — |
modifiers | List<Modifier> | empty | — |
triggers | List<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.
bookNameis the title of the book.{enchantment}is the display name and{level}the level in roman numerals.enchantmentLoreis a list of lines shown in the enchantment color. They accept{enchantment_lore}(the definition'senchantmentLore, or its display name when empty) and{level}.bookLoreadds extra lines. Placeholders from PlaceholderAPI are supported in all texts.
If the inventory is full, the books are dropped at the player's feet.