Uses of Class
org.bukkit.enchantments.Enchantment
Packages that use Enchantment
Package
Description
Collection of registry entry types that may be created or modified via the
RegistryEvent.The root package of the Bukkit API, contains generalized API classes.
Classes relating to the specialized enhancements to
item stacks, as part of the meta data.Events triggered from an enchantment table.Classes involved in manipulating player inventories and item interactions.
The interfaces used when manipulating extra data can can be stored inside
item stacks.-
Uses of Enchantment in io.papermc.paper.datacomponent.item
Methods in io.papermc.paper.datacomponent.item that return types with arguments of type EnchantmentModifier and TypeMethodDescription@Unmodifiable Map<Enchantment, @IntRange(from=1L,to=255L) Integer> ItemEnchantments.enchantments()Enchantments currently present on this item.Methods in io.papermc.paper.datacomponent.item with parameters of type EnchantmentModifier and TypeMethodDescriptionItemEnchantments.Builder.add(Enchantment enchantment, @org.checkerframework.common.value.qual.IntRange(from=1L, to=255L) int level) Adds an enchantment with the given level to this component.Method parameters in io.papermc.paper.datacomponent.item with type arguments of type EnchantmentModifier and TypeMethodDescriptionItemEnchantments.Builder.addAll(Map<Enchantment, @IntRange(from=1L,to=255L) Integer> enchantments) Adds enchantments with the given level to this component.static ItemEnchantmentsItemEnchantments.itemEnchantments(Map<Enchantment, @IntRange(from=1L,to=255L) Integer> enchantments, boolean showInTooltip) -
Uses of Enchantment in io.papermc.paper.registry
Fields in io.papermc.paper.registry with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final RegistryKey<Enchantment> RegistryKey.ENCHANTMENTData-driven registry for enchantments. -
Uses of Enchantment in io.papermc.paper.registry.data
Methods in io.papermc.paper.registry.data that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionEnchantmentRegistryEntry.exclusiveWith()Provides the registry key set of enchantments that this enchantment is exclusive with.Method parameters in io.papermc.paper.registry.data with type arguments of type EnchantmentModifier and TypeMethodDescriptionEnchantmentRegistryEntry.Builder.exclusiveWith(RegistryKeySet<Enchantment> exclusiveWith) Configures the registry key set of enchantments that this enchantment is exclusive with. -
Uses of Enchantment in io.papermc.paper.registry.event
Fields in io.papermc.paper.registry.event with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final RegistryEventProvider<Enchantment, EnchantmentRegistryEntry.Builder> RegistryEvents.ENCHANTMENT -
Uses of Enchantment in io.papermc.paper.registry.keys
Fields in io.papermc.paper.registry.keys with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final TypedKey<Enchantment> EnchantmentKeys.AQUA_AFFINITYminecraft:aqua_affinitystatic final TypedKey<Enchantment> EnchantmentKeys.BANE_OF_ARTHROPODSminecraft:bane_of_arthropodsstatic final TypedKey<Enchantment> EnchantmentKeys.BINDING_CURSEminecraft:binding_cursestatic final TypedKey<Enchantment> EnchantmentKeys.BLAST_PROTECTIONminecraft:blast_protectionstatic final TypedKey<Enchantment> EnchantmentKeys.BREACHminecraft:breachstatic final TypedKey<Enchantment> EnchantmentKeys.CHANNELINGminecraft:channelingstatic final TypedKey<Enchantment> EnchantmentKeys.DENSITYminecraft:densitystatic final TypedKey<Enchantment> EnchantmentKeys.DEPTH_STRIDERminecraft:depth_striderstatic final TypedKey<Enchantment> EnchantmentKeys.EFFICIENCYminecraft:efficiencystatic final TypedKey<Enchantment> EnchantmentKeys.FEATHER_FALLINGminecraft:feather_fallingstatic final TypedKey<Enchantment> EnchantmentKeys.FIRE_ASPECTminecraft:fire_aspectstatic final TypedKey<Enchantment> EnchantmentKeys.FIRE_PROTECTIONminecraft:fire_protectionstatic final TypedKey<Enchantment> EnchantmentKeys.FLAMEminecraft:flamestatic final TypedKey<Enchantment> EnchantmentKeys.FORTUNEminecraft:fortunestatic final TypedKey<Enchantment> EnchantmentKeys.FROST_WALKERminecraft:frost_walkerstatic final TypedKey<Enchantment> EnchantmentKeys.IMPALINGminecraft:impalingstatic final TypedKey<Enchantment> EnchantmentKeys.INFINITYminecraft:infinitystatic final TypedKey<Enchantment> EnchantmentKeys.KNOCKBACKminecraft:knockbackstatic final TypedKey<Enchantment> EnchantmentKeys.LOOTINGminecraft:lootingstatic final TypedKey<Enchantment> EnchantmentKeys.LOYALTYminecraft:loyaltystatic final TypedKey<Enchantment> EnchantmentKeys.LUCK_OF_THE_SEAminecraft:luck_of_the_seastatic final TypedKey<Enchantment> EnchantmentKeys.LUREminecraft:lurestatic final TypedKey<Enchantment> EnchantmentKeys.MENDINGminecraft:mendingstatic final TypedKey<Enchantment> EnchantmentKeys.MULTISHOTminecraft:multishotstatic final TypedKey<Enchantment> EnchantmentKeys.PIERCINGminecraft:piercingstatic final TypedKey<Enchantment> EnchantmentKeys.POWERminecraft:powerstatic final TypedKey<Enchantment> EnchantmentKeys.PROJECTILE_PROTECTIONminecraft:projectile_protectionstatic final TypedKey<Enchantment> EnchantmentKeys.PROTECTIONminecraft:protectionstatic final TypedKey<Enchantment> EnchantmentKeys.PUNCHminecraft:punchstatic final TypedKey<Enchantment> EnchantmentKeys.QUICK_CHARGEminecraft:quick_chargestatic final TypedKey<Enchantment> EnchantmentKeys.RESPIRATIONminecraft:respirationstatic final TypedKey<Enchantment> EnchantmentKeys.RIPTIDEminecraft:riptidestatic final TypedKey<Enchantment> EnchantmentKeys.SHARPNESSminecraft:sharpnessstatic final TypedKey<Enchantment> EnchantmentKeys.SILK_TOUCHminecraft:silk_touchstatic final TypedKey<Enchantment> EnchantmentKeys.SMITEminecraft:smitestatic final TypedKey<Enchantment> EnchantmentKeys.SOUL_SPEEDminecraft:soul_speedstatic final TypedKey<Enchantment> EnchantmentKeys.SWEEPING_EDGEminecraft:sweeping_edgestatic final TypedKey<Enchantment> EnchantmentKeys.SWIFT_SNEAKminecraft:swift_sneakstatic final TypedKey<Enchantment> EnchantmentKeys.THORNSminecraft:thornsstatic final TypedKey<Enchantment> EnchantmentKeys.UNBREAKINGminecraft:unbreakingstatic final TypedKey<Enchantment> EnchantmentKeys.VANISHING_CURSEminecraft:vanishing_cursestatic final TypedKey<Enchantment> EnchantmentKeys.WIND_BURSTminecraft:wind_burstMethods in io.papermc.paper.registry.keys that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionstatic TypedKey<Enchantment> Creates a key forEnchantmentin the registryminecraft:enchantment. -
Uses of Enchantment in io.papermc.paper.registry.keys.tags
Fields in io.papermc.paper.registry.keys.tags with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final TagKey<Enchantment> EnchantmentTagKeys.CURSE#minecraft:cursestatic final TagKey<Enchantment> EnchantmentTagKeys.DOUBLE_TRADE_PRICE#minecraft:double_trade_pricestatic final TagKey<Enchantment> EnchantmentTagKeys.EXCLUSIVE_SET_ARMOR#minecraft:exclusive_set/armorstatic final TagKey<Enchantment> EnchantmentTagKeys.EXCLUSIVE_SET_BOOTS#minecraft:exclusive_set/bootsstatic final TagKey<Enchantment> EnchantmentTagKeys.EXCLUSIVE_SET_BOW#minecraft:exclusive_set/bowstatic final TagKey<Enchantment> EnchantmentTagKeys.EXCLUSIVE_SET_CROSSBOW#minecraft:exclusive_set/crossbowstatic final TagKey<Enchantment> EnchantmentTagKeys.EXCLUSIVE_SET_DAMAGE#minecraft:exclusive_set/damagestatic final TagKey<Enchantment> EnchantmentTagKeys.EXCLUSIVE_SET_MINING#minecraft:exclusive_set/miningstatic final TagKey<Enchantment> EnchantmentTagKeys.EXCLUSIVE_SET_RIPTIDE#minecraft:exclusive_set/riptidestatic final TagKey<Enchantment> EnchantmentTagKeys.IN_ENCHANTING_TABLE#minecraft:in_enchanting_tablestatic final TagKey<Enchantment> EnchantmentTagKeys.NON_TREASURE#minecraft:non_treasurestatic final TagKey<Enchantment> EnchantmentTagKeys.ON_MOB_SPAWN_EQUIPMENT#minecraft:on_mob_spawn_equipmentstatic final TagKey<Enchantment> EnchantmentTagKeys.ON_RANDOM_LOOT#minecraft:on_random_lootstatic final TagKey<Enchantment> EnchantmentTagKeys.ON_TRADED_EQUIPMENT#minecraft:on_traded_equipmentstatic final TagKey<Enchantment> EnchantmentTagKeys.PREVENTS_BEE_SPAWNS_WHEN_MINING#minecraft:prevents_bee_spawns_when_miningstatic final TagKey<Enchantment> EnchantmentTagKeys.PREVENTS_DECORATED_POT_SHATTERING#minecraft:prevents_decorated_pot_shatteringstatic final TagKey<Enchantment> EnchantmentTagKeys.PREVENTS_ICE_MELTING#minecraft:prevents_ice_meltingstatic final TagKey<Enchantment> EnchantmentTagKeys.PREVENTS_INFESTED_SPAWNS#minecraft:prevents_infested_spawnsstatic final TagKey<Enchantment> EnchantmentTagKeys.SMELTS_LOOT#minecraft:smelts_lootstatic final TagKey<Enchantment> EnchantmentTagKeys.TOOLTIP_ORDER#minecraft:tooltip_orderstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADEABLE#minecraft:tradeablestatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_DESERT_COMMON#minecraft:trades/desert_commonstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_DESERT_SPECIAL#minecraft:trades/desert_specialstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_JUNGLE_COMMON#minecraft:trades/jungle_commonstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_JUNGLE_SPECIAL#minecraft:trades/jungle_specialstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_PLAINS_COMMON#minecraft:trades/plains_commonstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_PLAINS_SPECIAL#minecraft:trades/plains_specialstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_SAVANNA_COMMON#minecraft:trades/savanna_commonstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_SAVANNA_SPECIAL#minecraft:trades/savanna_specialstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_SNOW_COMMON#minecraft:trades/snow_commonstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_SNOW_SPECIAL#minecraft:trades/snow_specialstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_SWAMP_COMMON#minecraft:trades/swamp_commonstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_SWAMP_SPECIAL#minecraft:trades/swamp_specialstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_TAIGA_COMMON#minecraft:trades/taiga_commonstatic final TagKey<Enchantment> EnchantmentTagKeys.TRADES_TAIGA_SPECIAL#minecraft:trades/taiga_specialstatic final TagKey<Enchantment> EnchantmentTagKeys.TREASURE#minecraft:treasureMethods in io.papermc.paper.registry.keys.tags that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionstatic TagKey<Enchantment> Creates a tag key forEnchantmentin the registryminecraft:enchantment. -
Uses of Enchantment in org.bukkit
Fields in org.bukkit with type parameters of type EnchantmentModifier and TypeFieldDescriptionstatic final Registry<Enchantment> Registry.ENCHANTMENTDeprecated. -
Uses of Enchantment in org.bukkit.enchantments
Subclasses of Enchantment in org.bukkit.enchantmentsModifier and TypeClassDescriptionclassDeprecated.only for backwards compatibility, EnchantmentWrapper is no longer used.Fields in org.bukkit.enchantments declared as EnchantmentModifier and TypeFieldDescriptionstatic final EnchantmentEnchantment.AQUA_AFFINITYIncreases the speed at which a player may mine underwaterstatic final EnchantmentEnchantment.BANE_OF_ARTHROPODSIncreases damage against arthropod targetsstatic final EnchantmentEnchantment.BINDING_CURSEItem cannot be removedstatic final EnchantmentEnchantment.BLAST_PROTECTIONProvides protection against explosive damagestatic final EnchantmentEnchantment.BREACHReduces armor effectiveness against macesstatic final EnchantmentEnchantment.CHANNELINGStrikes lightning when a mob is hit with a trident if conditions are stormystatic final EnchantmentEnchantment.DENSITYIncreases fall damage of macesstatic final EnchantmentEnchantment.DEPTH_STRIDERIncreases walking speed while in waterstatic final EnchantmentEnchantment.EFFICIENCYIncreases the rate at which you mine/digstatic final EnchantmentEnchantment.FEATHER_FALLINGProvides protection against fall damagestatic final EnchantmentEnchantment.FIRE_ASPECTWhen attacking a target, has a chance to set them on firestatic final EnchantmentEnchantment.FIRE_PROTECTIONProvides protection against fire damagestatic final EnchantmentEnchantment.FLAMESets entities on fire when hit by arrows shot from a bowstatic final EnchantmentEnchantment.FORTUNEProvides a chance of gaining extra loot when destroying blocksstatic final EnchantmentEnchantment.FROST_WALKERFreezes any still water adjacent to ice / frost which player is walking onstatic final EnchantmentEnchantment.IMPALINGDeals more damage to mobs that live in the oceanstatic final EnchantmentEnchantment.INFINITYProvides infinite arrows when shooting a bowstatic final EnchantmentEnchantment.KNOCKBACKAll damage to other targets will knock them back when hitstatic final EnchantmentEnchantment.LOOTINGProvides a chance of gaining extra loot when killing monstersstatic final EnchantmentEnchantment.LOYALTYCauses a thrown trident to return to the player who threw itstatic final EnchantmentEnchantment.LUCK_OF_THE_SEADecreases odds of catching worthless junkstatic final EnchantmentEnchantment.LUREIncreases rate of fish biting your hookstatic final EnchantmentEnchantment.MENDINGAllows mending the item using experience orbsstatic final EnchantmentEnchantment.MULTISHOTShoot multiple arrows from crossbowsstatic final EnchantmentEnchantment.PIERCINGCrossbow projectiles pierce entitiesstatic final EnchantmentEnchantment.POWERProvides extra damage when shooting arrows from bowsstatic final EnchantmentEnchantment.PROJECTILE_PROTECTIONProvides protection against projectile damagestatic final EnchantmentEnchantment.PROTECTIONProvides protection against environmental damagestatic final EnchantmentEnchantment.PUNCHProvides a knockback when an entity is hit by an arrow from a bowstatic final EnchantmentEnchantment.QUICK_CHARGECharges crossbows quicklystatic final EnchantmentEnchantment.RESPIRATIONDecreases the rate of air loss whilst underwaterstatic final EnchantmentEnchantment.RIPTIDEWhen it is rainy, launches the player in the direction their trident is thrownstatic final EnchantmentEnchantment.SHARPNESSIncreases damage against all targetsstatic final EnchantmentEnchantment.SILK_TOUCHAllows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)static final EnchantmentEnchantment.SMITEIncreases damage against undead targetsstatic final EnchantmentEnchantment.SOUL_SPEEDWalk quicker on soul blocksstatic final EnchantmentEnchantment.SWEEPING_EDGEIncreases damage against targets when using a sweep attackstatic final EnchantmentEnchantment.SWIFT_SNEAKWalk quicker while sneakingstatic final EnchantmentEnchantment.THORNSDamages the attackerstatic final EnchantmentEnchantment.UNBREAKINGDecreases the rate at which a tool looses durabilitystatic final EnchantmentEnchantment.VANISHING_CURSEItem disappears instead of droppingstatic final EnchantmentEnchantment.WIND_BURSTEmits wind burst upon hitting enemyMethods in org.bukkit.enchantments that return EnchantmentModifier and TypeMethodDescriptionstatic @Nullable EnchantmentEnchantment.getByKey(@Nullable NamespacedKey key) Deprecated.only for backwards compatibility, useRegistry.get(NamespacedKey)insteadstatic @Nullable EnchantmentDeprecated.enchantments are badly named, usegetByKey(org.bukkit.NamespacedKey).EnchantmentOffer.getEnchantment()Get the type of the enchantment.EnchantmentWrapper.getEnchantment()Deprecated.Gets the enchantment bound to this wrapperstatic @NotNull Enchantment[]Enchantment.values()Deprecated.Methods in org.bukkit.enchantments that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionabstract @NotNull RegistryKeySet<Enchantment> Enchantment.getExclusiveWith()Provides the registry key set of enchantments that this enchantment is exclusive with.Methods in org.bukkit.enchantments with parameters of type EnchantmentModifier and TypeMethodDescriptionabstract booleanEnchantment.conflictsWith(@NotNull Enchantment other) Check if this enchantment conflicts with another enchantment.voidEnchantmentOffer.setEnchantment(@NotNull Enchantment enchantment) Sets the type of the enchantment.Constructors in org.bukkit.enchantments with parameters of type EnchantmentModifierConstructorDescriptionEnchantmentOffer(@NotNull Enchantment enchantment, int enchantmentLevel, int cost) -
Uses of Enchantment in org.bukkit.event.enchantment
Methods in org.bukkit.event.enchantment that return EnchantmentModifier and TypeMethodDescriptionEnchantItemEvent.getEnchantmentHint()Get theEnchantmentthat was displayed as a hint to the player on the selected enchantment offer.Methods in org.bukkit.event.enchantment that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionEnchantItemEvent.getEnchantsToAdd()Get map of enchantment (levels, keyed by type) to be added to item (modify map returned to change values).Constructors in org.bukkit.event.enchantment with parameters of type EnchantmentModifierConstructorDescriptionEnchantItemEvent(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, int level, @NotNull Map<Enchantment, Integer> enchants, @NotNull Enchantment enchantmentHint, int levelHint, int i) Constructor parameters in org.bukkit.event.enchantment with type arguments of type EnchantmentModifierConstructorDescriptionEnchantItemEvent(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, int level, @NotNull Map<Enchantment, Integer> enchants, @NotNull Enchantment enchantmentHint, int levelHint, int i) -
Uses of Enchantment in org.bukkit.inventory
Methods in org.bukkit.inventory that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionItemStack.getEnchantments()Gets a map containing all enchantments and their levels on this item.Methods in org.bukkit.inventory with parameters of type EnchantmentModifier and TypeMethodDescriptionvoidItemStack.addEnchantment(@NotNull Enchantment ench, int level) Adds the specifiedEnchantmentto this item stack.voidItemStack.addUnsafeEnchantment(@NotNull Enchantment ench, int level) Adds the specifiedEnchantmentto this item stack.booleanItemStack.containsEnchantment(@NotNull Enchantment ench) Checks if this ItemStack contains the givenEnchantmentintItemStack.getEnchantmentLevel(@NotNull Enchantment ench) Gets the level of the specified enchantment on this item stackintItemStack.removeEnchantment(@NotNull Enchantment ench) Removes the specifiedEnchantmentif it exists on this ItemStackMethod parameters in org.bukkit.inventory with type arguments of type EnchantmentModifier and TypeMethodDescriptionvoidItemStack.addEnchantments(@NotNull Map<Enchantment, Integer> enchantments) Adds the specified enchantments to this item stack.voidItemStack.addUnsafeEnchantments(@NotNull Map<Enchantment, Integer> enchantments) Adds the specified enchantments to this item stack in an unsafe manner.ItemFactory.enchantWithLevels(@NotNull ItemStack itemStack, @org.jetbrains.annotations.Range(from=1L, to=30L) int levels, RegistryKeySet<@NotNull Enchantment> keySet, Random random) Randomly enchants a copy of the providedItemStackusing the given experience levels.ItemStack.enchantWithLevels(@org.jetbrains.annotations.Range(from=1L, to=30L) int levels, RegistryKeySet<@NotNull Enchantment> keySet, Random random) Randomly enchants a copy of thisItemStackusing the given experience levels. -
Uses of Enchantment in org.bukkit.inventory.meta
Methods in org.bukkit.inventory.meta that return types with arguments of type EnchantmentModifier and TypeMethodDescriptionItemMeta.getEnchants()Returns a copy the enchantments in this ItemMeta.EnchantmentStorageMeta.getStoredEnchants()Gets a copy the stored enchantments in this ItemMeta.Methods in org.bukkit.inventory.meta with parameters of type EnchantmentModifier and TypeMethodDescriptionbooleanItemMeta.addEnchant(@NotNull Enchantment ench, int level, boolean ignoreLevelRestriction) Adds the specified enchantment to this item meta.booleanEnchantmentStorageMeta.addStoredEnchant(@NotNull Enchantment ench, int level, boolean ignoreLevelRestriction) Stores the specified enchantment in this item meta.intItemMeta.getEnchantLevel(@NotNull Enchantment ench) Checks for the level of the specified enchantment.intEnchantmentStorageMeta.getStoredEnchantLevel(@NotNull Enchantment ench) Checks for the level of the stored enchantment.booleanItemMeta.hasConflictingEnchant(@NotNull Enchantment ench) Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.booleanEnchantmentStorageMeta.hasConflictingStoredEnchant(@NotNull Enchantment ench) Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.booleanItemMeta.hasEnchant(@NotNull Enchantment ench) Checks for existence of the specified enchantment.booleanEnchantmentStorageMeta.hasStoredEnchant(@NotNull Enchantment ench) Checks for storage of the specified enchantment.booleanItemMeta.removeEnchant(@NotNull Enchantment ench) Removes the specified enchantment from this item meta.booleanEnchantmentStorageMeta.removeStoredEnchant(@NotNull Enchantment ench) Remove the specified stored enchantment from this item meta.
RegistryAccess.getRegistry(io.papermc.paper.registry.RegistryKey)withRegistryKey.ENCHANTMENT