Uses of Class
org.bukkit.enchantments.Enchantment
Package
Description
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 org.bukkit
Modifier and TypeFieldDescriptionstatic final Registry<Enchantment>
Registry.ENCHANTMENT
Server enchantments. -
Uses of Enchantment in org.bukkit.enchantments
Modifier and TypeClassDescriptionclass
Deprecated.only for backwards compatibility, EnchantmentWrapper is no longer used.Modifier and TypeFieldDescriptionstatic final Enchantment
Enchantment.ARROW_DAMAGE
Provides extra damage when shooting arrows from bowsstatic final Enchantment
Enchantment.ARROW_FIRE
Sets entities on fire when hit by arrows shot from a bowstatic final Enchantment
Enchantment.ARROW_INFINITE
Provides infinite arrows when shooting a bowstatic final Enchantment
Enchantment.ARROW_KNOCKBACK
Provides a knockback when an entity is hit by an arrow from a bowstatic final Enchantment
Enchantment.BINDING_CURSE
Item cannot be removedstatic final Enchantment
Enchantment.CHANNELING
Strikes lightning when a mob is hit with a trident if conditions are stormystatic final Enchantment
Enchantment.DAMAGE_ALL
Increases damage against all targetsstatic final Enchantment
Enchantment.DAMAGE_ARTHROPODS
Increases damage against arthropod targetsstatic final Enchantment
Enchantment.DAMAGE_UNDEAD
Increases damage against undead targetsstatic final Enchantment
Enchantment.DEPTH_STRIDER
Increases walking speed while in waterstatic final Enchantment
Enchantment.DIG_SPEED
Increases the rate at which you mine/digstatic final Enchantment
Enchantment.DURABILITY
Decreases the rate at which a tool looses durabilitystatic final Enchantment
Enchantment.FIRE_ASPECT
When attacking a target, has a chance to set them on firestatic final Enchantment
Enchantment.FROST_WALKER
Freezes any still water adjacent to ice / frost which player is walking onstatic final Enchantment
Enchantment.IMPALING
Deals more damage to mobs that live in the oceanstatic final Enchantment
Enchantment.KNOCKBACK
All damage to other targets will knock them back when hitstatic final Enchantment
Enchantment.LOOT_BONUS_BLOCKS
Provides a chance of gaining extra loot when destroying blocksstatic final Enchantment
Enchantment.LOOT_BONUS_MOBS
Provides a chance of gaining extra loot when killing monstersstatic final Enchantment
Enchantment.LOYALTY
Causes a thrown trident to return to the player who threw itstatic final Enchantment
Enchantment.LUCK
Decreases odds of catching worthless junkstatic final Enchantment
Enchantment.LURE
Increases rate of fish biting your hookstatic final Enchantment
Enchantment.MENDING
Allows mending the item using experience orbsstatic final Enchantment
Enchantment.MULTISHOT
Shoot multiple arrows from crossbowsstatic final Enchantment
Enchantment.OXYGEN
Decreases the rate of air loss whilst underwaterstatic final Enchantment
Enchantment.PIERCING
Crossbow projectiles pierce entitiesstatic final Enchantment
Enchantment.PROTECTION_ENVIRONMENTAL
Provides protection against environmental damagestatic final Enchantment
Enchantment.PROTECTION_EXPLOSIONS
Provides protection against explosive damagestatic final Enchantment
Enchantment.PROTECTION_FALL
Provides protection against fall damagestatic final Enchantment
Enchantment.PROTECTION_FIRE
Provides protection against fire damagestatic final Enchantment
Enchantment.PROTECTION_PROJECTILE
Provides protection against projectile damagestatic final Enchantment
Enchantment.QUICK_CHARGE
Charges crossbows quicklystatic final Enchantment
Enchantment.RIPTIDE
When it is rainy, launches the player in the direction their trident is thrownstatic final Enchantment
Enchantment.SILK_TOUCH
Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)static final Enchantment
Enchantment.SOUL_SPEED
Walk quicker on soul blocksstatic final Enchantment
Enchantment.SWEEPING_EDGE
Increases damage against targets when using a sweep attackstatic final Enchantment
Enchantment.SWIFT_SNEAK
Walk quicker while sneakingstatic final Enchantment
Enchantment.THORNS
Damages the attackerstatic final Enchantment
Enchantment.VANISHING_CURSE
Item disappears instead of droppingstatic final Enchantment
Enchantment.WATER_WORKER
Increases the speed at which a player may mine underwaterModifier and TypeMethodDescriptionstatic @Nullable Enchantment
Enchantment.getByKey
(@Nullable NamespacedKey key) Deprecated.only for backwards compatibility, useRegistry.get(NamespacedKey)
insteadstatic @Nullable Enchantment
Deprecated.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.Modifier and TypeMethodDescriptionabstract boolean
Enchantment.conflictsWith
(@NotNull Enchantment other) Check if this enchantment conflicts with another enchantment.void
EnchantmentOffer.setEnchantment
(@NotNull Enchantment enchantment) Sets the type of the enchantment.ModifierConstructorDescriptionEnchantmentOffer
(@NotNull Enchantment enchantment, int enchantmentLevel, int cost) -
Uses of Enchantment in org.bukkit.event.enchantment
Modifier and TypeMethodDescriptionEnchantItemEvent.getEnchantmentHint()
Get theEnchantment
that was displayed as a hint to the player on the selected enchantment offer.Modifier and TypeMethodDescriptionEnchantItemEvent.getEnchantsToAdd()
Get map of enchantment (levels, keyed by type) to be added to item (modify map returned to change values).ModifierConstructorDescriptionEnchantItemEvent
(@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) ModifierConstructorDescriptionEnchantItemEvent
(@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
Modifier and TypeMethodDescriptionItemStack.getEnchantments()
Gets a map containing all enchantments and their levels on this item.ItemStack.getEnchants()
Returns a copy the enchantments in this ItemMeta.Modifier and TypeMethodDescriptionboolean
ItemStack.addEnchant
(@NotNull Enchantment ench, int level, boolean ignoreLevelRestriction) Adds the specified enchantment to this item meta.void
ItemStack.addEnchantment
(@NotNull Enchantment ench, int level) Adds the specifiedEnchantment
to this item stack.void
ItemStack.addUnsafeEnchantment
(@NotNull Enchantment ench, int level) Adds the specifiedEnchantment
to this item stack.boolean
ItemStack.containsEnchantment
(@NotNull Enchantment ench) Checks if this ItemStack contains the givenEnchantment
int
ItemStack.getEnchantLevel
(@NotNull Enchantment ench) Checks for the level of the specified enchantment.int
ItemStack.getEnchantmentLevel
(@NotNull Enchantment ench) Gets the level of the specified enchantment on this item stackboolean
ItemStack.hasConflictingEnchant
(@NotNull Enchantment ench) Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.boolean
ItemStack.hasEnchant
(@NotNull Enchantment ench) Checks for existence of the specified enchantment.boolean
ItemStack.removeEnchant
(@NotNull Enchantment ench) Removes the specified enchantment from this item meta.int
ItemStack.removeEnchantment
(@NotNull Enchantment ench) Removes the specifiedEnchantment
if it exists on this ItemStackModifier and TypeMethodDescriptionvoid
ItemStack.addEnchantments
(@NotNull Map<Enchantment, Integer> enchantments) Adds the specified enchantments to this item stack.void
ItemStack.addUnsafeEnchantments
(@NotNull Map<Enchantment, Integer> enchantments) Adds the specified enchantments to this item stack in an unsafe manner. -
Uses of Enchantment in org.bukkit.inventory.meta
Modifier and TypeMethodDescriptionItemMeta.getEnchants()
Returns a copy the enchantments in this ItemMeta.EnchantmentStorageMeta.getStoredEnchants()
Gets a copy the stored enchantments in this ItemMeta.Modifier and TypeMethodDescriptionboolean
ItemMeta.addEnchant
(@NotNull Enchantment ench, int level, boolean ignoreLevelRestriction) Adds the specified enchantment to this item meta.boolean
EnchantmentStorageMeta.addStoredEnchant
(@NotNull Enchantment ench, int level, boolean ignoreLevelRestriction) Stores the specified enchantment in this item meta.int
ItemMeta.getEnchantLevel
(@NotNull Enchantment ench) Checks for the level of the specified enchantment.int
EnchantmentStorageMeta.getStoredEnchantLevel
(@NotNull Enchantment ench) Checks for the level of the stored enchantment.boolean
ItemMeta.hasConflictingEnchant
(@NotNull Enchantment ench) Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.boolean
EnchantmentStorageMeta.hasConflictingStoredEnchant
(@NotNull Enchantment ench) Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.boolean
ItemMeta.hasEnchant
(@NotNull Enchantment ench) Checks for existence of the specified enchantment.boolean
EnchantmentStorageMeta.hasStoredEnchant
(@NotNull Enchantment ench) Checks for storage of the specified enchantment.boolean
ItemMeta.removeEnchant
(@NotNull Enchantment ench) Removes the specified enchantment from this item meta.boolean
EnchantmentStorageMeta.removeStoredEnchant
(@NotNull Enchantment ench) Remove the specified stored enchantment from this item meta.