Uses of Class
org.bukkit.enchantments.Enchantment
Package | Description |
---|---|
org.bukkit |
The root package of the Bukkit API, contains generalized API classes.
|
org.bukkit.enchantments |
Classes relating to the specialized enhancements to
item stacks , as part of the meta data . |
org.bukkit.event.enchantment |
Events triggered from an enchantment table . |
org.bukkit.inventory |
Classes involved in manipulating player inventories and item interactions.
|
org.bukkit.inventory.meta |
The interfaces used when manipulating extra data can can be stored inside
item stacks . |
-
Uses of Enchantment in org.bukkit
Fields in org.bukkit with type parameters of type Enchantment Modifier and Type Field Description static Registry<Enchantment>
Registry. ENCHANTMENT
Server enchantments. -
Uses of Enchantment in org.bukkit.enchantments
Subclasses of Enchantment in org.bukkit.enchantments Modifier and Type Class Description class
EnchantmentWrapper
A simple wrapper for ease of selectingEnchantment
sFields in org.bukkit.enchantments declared as Enchantment Modifier and Type Field Description static Enchantment
Enchantment. ARROW_DAMAGE
Provides extra damage when shooting arrows from bowsstatic Enchantment
Enchantment. ARROW_FIRE
Sets entities on fire when hit by arrows shot from a bowstatic Enchantment
Enchantment. ARROW_INFINITE
Provides infinite arrows when shooting a bowstatic Enchantment
Enchantment. ARROW_KNOCKBACK
Provides a knockback when an entity is hit by an arrow from a bowstatic Enchantment
Enchantment. BINDING_CURSE
Item cannot be removedstatic Enchantment
Enchantment. CHANNELING
Strikes lightning when a mob is hit with a trident if conditions are stormystatic Enchantment
Enchantment. DAMAGE_ALL
Increases damage against all targetsstatic Enchantment
Enchantment. DAMAGE_ARTHROPODS
Increases damage against arthropod targetsstatic Enchantment
Enchantment. DAMAGE_UNDEAD
Increases damage against undead targetsstatic Enchantment
Enchantment. DEPTH_STRIDER
Increases walking speed while in waterstatic Enchantment
Enchantment. DIG_SPEED
Increases the rate at which you mine/digstatic Enchantment
Enchantment. DURABILITY
Decreases the rate at which a tool looses durabilitystatic Enchantment
Enchantment. FIRE_ASPECT
When attacking a target, has a chance to set them on firestatic Enchantment
Enchantment. FROST_WALKER
Freezes any still water adjacent to ice / frost which player is walking onstatic Enchantment
Enchantment. IMPALING
Deals more damage to mobs that live in the oceanstatic Enchantment
Enchantment. KNOCKBACK
All damage to other targets will knock them back when hitstatic Enchantment
Enchantment. LOOT_BONUS_BLOCKS
Provides a chance of gaining extra loot when destroying blocksstatic Enchantment
Enchantment. LOOT_BONUS_MOBS
Provides a chance of gaining extra loot when killing monstersstatic Enchantment
Enchantment. LOYALTY
Causes a thrown trident to return to the player who threw itstatic Enchantment
Enchantment. LUCK
Decreases odds of catching worthless junkstatic Enchantment
Enchantment. LURE
Increases rate of fish biting your hookstatic Enchantment
Enchantment. MENDING
Allows mending the item using experience orbsstatic Enchantment
Enchantment. MULTISHOT
Shoot multiple arrows from crossbowsstatic Enchantment
Enchantment. OXYGEN
Decreases the rate of air loss whilst underwaterstatic Enchantment
Enchantment. PIERCING
Crossbow projectiles pierce entitiesstatic Enchantment
Enchantment. PROTECTION_ENVIRONMENTAL
Provides protection against environmental damagestatic Enchantment
Enchantment. PROTECTION_EXPLOSIONS
Provides protection against explosive damagestatic Enchantment
Enchantment. PROTECTION_FALL
Provides protection against fall damagestatic Enchantment
Enchantment. PROTECTION_FIRE
Provides protection against fire damagestatic Enchantment
Enchantment. PROTECTION_PROJECTILE
Provides protection against projectile damagestatic Enchantment
Enchantment. QUICK_CHARGE
Charges crossbows quicklystatic Enchantment
Enchantment. RIPTIDE
When it is rainy, launches the player in the direction their trident is thrownstatic Enchantment
Enchantment. SILK_TOUCH
Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)static Enchantment
Enchantment. SOUL_SPEED
Walk quicker on soul blocksstatic Enchantment
Enchantment. SWEEPING_EDGE
Increases damage against targets when using a sweep attackstatic Enchantment
Enchantment. THORNS
Damages the attackerstatic Enchantment
Enchantment. VANISHING_CURSE
Item disappears instead of droppingstatic Enchantment
Enchantment. WATER_WORKER
Increases the speed at which a player may mine underwaterMethods in org.bukkit.enchantments that return Enchantment Modifier and Type Method Description static Enchantment
Enchantment. getByKey(NamespacedKey key)
Gets the Enchantment at the specified keystatic Enchantment
Enchantment. getByName(String name)
Deprecated.enchantments are badly named, usegetByKey(org.bukkit.NamespacedKey)
.Enchantment
EnchantmentOffer. getEnchantment()
Get the type of the enchantment.Enchantment
EnchantmentWrapper. getEnchantment()
Gets the enchantment bound to this wrapperstatic Enchantment[]
Enchantment. values()
Gets an array of all the registeredEnchantment
sMethods in org.bukkit.enchantments with parameters of type Enchantment Modifier and Type Method Description abstract boolean
Enchantment. conflictsWith(Enchantment other)
Check if this enchantment conflicts with another enchantment.boolean
EnchantmentWrapper. conflictsWith(Enchantment other)
static void
Enchantment. registerEnchantment(Enchantment enchantment)
Registers an enchantment with the given ID and object.void
EnchantmentOffer. setEnchantment(Enchantment enchantment)
Sets the type of the enchantment.Constructors in org.bukkit.enchantments with parameters of type Enchantment Constructor Description EnchantmentOffer(Enchantment enchantment, int enchantmentLevel, int cost)
-
Uses of Enchantment in org.bukkit.event.enchantment
Methods in org.bukkit.event.enchantment that return types with arguments of type Enchantment Modifier and Type Method Description Map<Enchantment,Integer>
EnchantItemEvent. getEnchantsToAdd()
Get map of enchantment (levels, keyed by type) to be added to item (modify map returned to change values).Constructor parameters in org.bukkit.event.enchantment with type arguments of type Enchantment Constructor Description EnchantItemEvent(Player enchanter, InventoryView view, Block table, ItemStack item, int level, Map<Enchantment,Integer> enchants, int i)
-
Uses of Enchantment in org.bukkit.inventory
Methods in org.bukkit.inventory that return types with arguments of type Enchantment Modifier and Type Method Description Map<Enchantment,Integer>
ItemStack. getEnchantments()
Gets a map containing all enchantments and their levels on this item.Methods in org.bukkit.inventory with parameters of type Enchantment Modifier and Type Method Description void
ItemStack. addEnchantment(Enchantment ench, int level)
Adds the specifiedEnchantment
to this item stack.void
ItemStack. addUnsafeEnchantment(Enchantment ench, int level)
Adds the specifiedEnchantment
to this item stack.boolean
ItemStack. containsEnchantment(Enchantment ench)
Checks if this ItemStack contains the givenEnchantment
int
ItemStack. getEnchantmentLevel(Enchantment ench)
Gets the level of the specified enchantment on this item stackint
ItemStack. removeEnchantment(Enchantment ench)
Removes the specifiedEnchantment
if it exists on this ItemStackMethod parameters in org.bukkit.inventory with type arguments of type Enchantment Modifier and Type Method Description void
ItemStack. addEnchantments(Map<Enchantment,Integer> enchantments)
Adds the specified enchantments to this item stack.void
ItemStack. addUnsafeEnchantments(Map<Enchantment,Integer> enchantments)
Adds the specified enchantments to this item stack in an unsafe manner. -
Uses of Enchantment in org.bukkit.inventory.meta
Methods in org.bukkit.inventory.meta that return types with arguments of type Enchantment Modifier and Type Method Description Map<Enchantment,Integer>
ItemMeta. getEnchants()
Returns a copy the enchantments in this ItemMeta.Map<Enchantment,Integer>
EnchantmentStorageMeta. getStoredEnchants()
Gets a copy the stored enchantments in this ItemMeta.Methods in org.bukkit.inventory.meta with parameters of type Enchantment Modifier and Type Method Description boolean
ItemMeta. addEnchant(Enchantment ench, int level, boolean ignoreLevelRestriction)
Adds the specified enchantment to this item meta.boolean
EnchantmentStorageMeta. addStoredEnchant(Enchantment ench, int level, boolean ignoreLevelRestriction)
Stores the specified enchantment in this item meta.int
ItemMeta. getEnchantLevel(Enchantment ench)
Checks for the level of the specified enchantment.int
EnchantmentStorageMeta. getStoredEnchantLevel(Enchantment ench)
Checks for the level of the stored enchantment.boolean
ItemMeta. hasConflictingEnchant(Enchantment ench)
Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.boolean
EnchantmentStorageMeta. hasConflictingStoredEnchant(Enchantment ench)
Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.boolean
ItemMeta. hasEnchant(Enchantment ench)
Checks for existence of the specified enchantment.boolean
EnchantmentStorageMeta. hasStoredEnchant(Enchantment ench)
Checks for storage of the specified enchantment.boolean
ItemMeta. removeEnchant(Enchantment ench)
Removes the specified enchantment from this item meta.boolean
EnchantmentStorageMeta. removeStoredEnchant(Enchantment ench)
Remove the specified stored enchantment from this item meta.