Uses of Class
org.bukkit.enchantments.Enchantment
| Package | Description |
|---|---|
| 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.enchantments
Subclasses of Enchantment in org.bukkit.enchantments Modifier and Type Class Description classEnchantmentWrapperA simple wrapper for ease of selectingEnchantmentsFields in org.bukkit.enchantments declared as Enchantment Modifier and Type Field Description static EnchantmentEnchantment. ARROW_DAMAGEProvides extra damage when shooting arrows from bowsstatic EnchantmentEnchantment. ARROW_FIRESets entities on fire when hit by arrows shot from a bowstatic EnchantmentEnchantment. ARROW_INFINITEProvides infinite arrows when shooting a bowstatic EnchantmentEnchantment. ARROW_KNOCKBACKProvides a knockback when an entity is hit by an arrow from a bowstatic EnchantmentEnchantment. DAMAGE_ALLIncreases damage against all targetsstatic EnchantmentEnchantment. DAMAGE_ARTHROPODSIncreases damage against arthropod targetsstatic EnchantmentEnchantment. DAMAGE_UNDEADIncreases damage against undead targetsstatic EnchantmentEnchantment. DEPTH_STRIDERIncreases walking speed while in waterstatic EnchantmentEnchantment. DIG_SPEEDIncreases the rate at which you mine/digstatic EnchantmentEnchantment. DURABILITYDecreases the rate at which a tool looses durabilitystatic EnchantmentEnchantment. FIRE_ASPECTWhen attacking a target, has a chance to set them on firestatic EnchantmentEnchantment. KNOCKBACKAll damage to other targets will knock them back when hitstatic EnchantmentEnchantment. LOOT_BONUS_BLOCKSProvides a chance of gaining extra loot when destroying blocksstatic EnchantmentEnchantment. LOOT_BONUS_MOBSProvides a chance of gaining extra loot when killing monstersstatic EnchantmentEnchantment. LUCKDecreases odds of catching worthless junkstatic EnchantmentEnchantment. LUREIncreases rate of fish biting your hookstatic EnchantmentEnchantment. OXYGENDecreases the rate of air loss whilst underwaterstatic EnchantmentEnchantment. PROTECTION_ENVIRONMENTALProvides protection against environmental damagestatic EnchantmentEnchantment. PROTECTION_EXPLOSIONSProvides protection against explosive damagestatic EnchantmentEnchantment. PROTECTION_FALLProvides protection against fall damagestatic EnchantmentEnchantment. PROTECTION_FIREProvides protection against fire damagestatic EnchantmentEnchantment. PROTECTION_PROJECTILEProvides protection against projectile damagestatic EnchantmentEnchantment. SILK_TOUCHAllows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)static EnchantmentEnchantment. THORNSDamages the attackerstatic EnchantmentEnchantment. WATER_WORKERIncreases the speed at which a player may mine underwaterMethods in org.bukkit.enchantments that return Enchantment Modifier and Type Method Description static EnchantmentEnchantment. getById(int id)Deprecated.Magic valuestatic EnchantmentEnchantment. getByName(java.lang.String name)Gets the Enchantment at the specified nameEnchantmentEnchantmentWrapper. getEnchantment()Gets the enchantment bound to this wrapperstatic Enchantment[]Enchantment. values()Gets an array of all the registeredEnchantmentsMethods in org.bukkit.enchantments with parameters of type Enchantment Modifier and Type Method Description abstract booleanEnchantment. conflictsWith(Enchantment other)Check if this enchantment conflicts with another enchantment.booleanEnchantmentWrapper. conflictsWith(Enchantment other)static voidEnchantment. registerEnchantment(Enchantment enchantment)Registers an enchantment with the given ID and object. -
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 java.util.Map<Enchantment,java.lang.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, java.util.Map<Enchantment,java.lang.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 java.util.Map<Enchantment,java.lang.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 voidItemStack. addEnchantment(Enchantment ench, int level)Adds the specifiedEnchantmentto this item stack.voidItemStack. addUnsafeEnchantment(Enchantment ench, int level)Adds the specifiedEnchantmentto this item stack.booleanItemStack. containsEnchantment(Enchantment ench)Checks if this ItemStack contains the givenEnchantmentintItemStack. getEnchantmentLevel(Enchantment ench)Gets the level of the specified enchantment on this item stackintItemStack. removeEnchantment(Enchantment ench)Removes the specifiedEnchantmentif it exists on this ItemStackMethod parameters in org.bukkit.inventory with type arguments of type Enchantment Modifier and Type Method Description voidItemStack. addEnchantments(java.util.Map<Enchantment,java.lang.Integer> enchantments)Adds the specified enchantments to this item stack.voidItemStack. addUnsafeEnchantments(java.util.Map<Enchantment,java.lang.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 java.util.Map<Enchantment,java.lang.Integer>ItemMeta. getEnchants()Returns a copy the enchantments in this ItemMeta.java.util.Map<Enchantment,java.lang.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 booleanItemMeta. addEnchant(Enchantment ench, int level, boolean ignoreLevelRestriction)Adds the specified enchantment to this item meta.booleanEnchantmentStorageMeta. addStoredEnchant(Enchantment ench, int level, boolean ignoreLevelRestriction)Stores the specified enchantment in this item meta.intItemMeta. getEnchantLevel(Enchantment ench)Checks for the level of the specified enchantment.intEnchantmentStorageMeta. getStoredEnchantLevel(Enchantment ench)Checks for the level of the stored enchantment.booleanItemMeta. hasConflictingEnchant(Enchantment ench)Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.booleanEnchantmentStorageMeta. hasConflictingStoredEnchant(Enchantment ench)Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.booleanItemMeta. hasEnchant(Enchantment ench)Checks for existence of the specified enchantment.booleanEnchantmentStorageMeta. hasStoredEnchant(Enchantment ench)Checks for storage of the specified enchantment.booleanItemMeta. removeEnchant(Enchantment ench)Removes the specified enchantment from this item meta.booleanEnchantmentStorageMeta. removeStoredEnchant(Enchantment ench)Remove the specified stored enchantment from this item meta.