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.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 . |
Modifier and Type | Field and Description |
---|---|
static Registry<Enchantment> |
Registry.ENCHANTMENT
Server enchantments.
|
Modifier and Type | Class and Description |
---|---|
class |
EnchantmentWrapper
A simple wrapper for ease of selecting
Enchantment s |
Modifier and Type | Field and Description |
---|---|
static Enchantment |
Enchantment.ARROW_DAMAGE
Provides extra damage when shooting arrows from bows
|
static Enchantment |
Enchantment.ARROW_FIRE
Sets entities on fire when hit by arrows shot from a bow
|
static Enchantment |
Enchantment.ARROW_INFINITE
Provides infinite arrows when shooting a bow
|
static Enchantment |
Enchantment.ARROW_KNOCKBACK
Provides a knockback when an entity is hit by an arrow from a bow
|
static Enchantment |
Enchantment.BINDING_CURSE
Item cannot be removed
|
static Enchantment |
Enchantment.CHANNELING
Strikes lightning when a mob is hit with a trident if conditions are
stormy
|
static Enchantment |
Enchantment.DAMAGE_ALL
Increases damage against all targets
|
static Enchantment |
Enchantment.DAMAGE_ARTHROPODS
Increases damage against arthropod targets
|
static Enchantment |
Enchantment.DAMAGE_UNDEAD
Increases damage against undead targets
|
static Enchantment |
Enchantment.DEPTH_STRIDER
Increases walking speed while in water
|
static Enchantment |
Enchantment.DIG_SPEED
Increases the rate at which you mine/dig
|
static Enchantment |
Enchantment.DURABILITY
Decreases the rate at which a tool looses durability
|
static Enchantment |
Enchantment.FIRE_ASPECT
When attacking a target, has a chance to set them on fire
|
static Enchantment |
Enchantment.FROST_WALKER
Freezes any still water adjacent to ice / frost which player is walking on
|
static Enchantment |
Enchantment.IMPALING
Deals more damage to mobs that live in the ocean
|
static Enchantment |
Enchantment.KNOCKBACK
All damage to other targets will knock them back when hit
|
static Enchantment |
Enchantment.LOOT_BONUS_BLOCKS
Provides a chance of gaining extra loot when destroying blocks
|
static Enchantment |
Enchantment.LOOT_BONUS_MOBS
Provides a chance of gaining extra loot when killing monsters
|
static Enchantment |
Enchantment.LOYALTY
Causes a thrown trident to return to the player who threw it
|
static Enchantment |
Enchantment.LUCK
Decreases odds of catching worthless junk
|
static Enchantment |
Enchantment.LURE
Increases rate of fish biting your hook
|
static Enchantment |
Enchantment.MENDING
Allows mending the item using experience orbs
|
static Enchantment |
Enchantment.MULTISHOT
Shoot multiple arrows from crossbows
|
static Enchantment |
Enchantment.OXYGEN
Decreases the rate of air loss whilst underwater
|
static Enchantment |
Enchantment.PIERCING
Crossbow projectiles pierce entities
|
static Enchantment |
Enchantment.PROTECTION_ENVIRONMENTAL
Provides protection against environmental damage
|
static Enchantment |
Enchantment.PROTECTION_EXPLOSIONS
Provides protection against explosive damage
|
static Enchantment |
Enchantment.PROTECTION_FALL
Provides protection against fall damage
|
static Enchantment |
Enchantment.PROTECTION_FIRE
Provides protection against fire damage
|
static Enchantment |
Enchantment.PROTECTION_PROJECTILE
Provides protection against projectile damage
|
static Enchantment |
Enchantment.QUICK_CHARGE
Charges crossbows quickly
|
static Enchantment |
Enchantment.RIPTIDE
When it is rainy, launches the player in the direction their trident is thrown
|
static 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 blocks
|
static Enchantment |
Enchantment.SWEEPING_EDGE
Increases damage against targets when using a sweep attack
|
static Enchantment |
Enchantment.THORNS
Damages the attacker
|
static Enchantment |
Enchantment.VANISHING_CURSE
Item disappears instead of dropping
|
static Enchantment |
Enchantment.WATER_WORKER
Increases the speed at which a player may mine underwater
|
Modifier and Type | Method and Description |
---|---|
static @Nullable Enchantment |
Enchantment.getByKey(@Nullable NamespacedKey key)
Gets the Enchantment at the specified key
|
static @Nullable Enchantment |
Enchantment.getByName(@Nullable String name)
Deprecated.
enchantments are badly named, use
getByKey(org.bukkit.NamespacedKey) . |
@NotNull Enchantment |
EnchantmentOffer.getEnchantment()
Get the type of the enchantment.
|
@NotNull Enchantment |
EnchantmentWrapper.getEnchantment()
Gets the enchantment bound to this wrapper
|
static @NotNull Enchantment[] |
Enchantment.values()
Gets an array of all the registered
Enchantment s |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
Enchantment.conflictsWith(@NotNull Enchantment other)
Check if this enchantment conflicts with another enchantment.
|
boolean |
EnchantmentWrapper.conflictsWith(@NotNull Enchantment other) |
static void |
Enchantment.registerEnchantment(@NotNull Enchantment enchantment)
Registers an enchantment with the given ID and object.
|
void |
EnchantmentOffer.setEnchantment(@NotNull Enchantment enchantment)
Sets the type of the enchantment.
|
Constructor and Description |
---|
EnchantmentOffer(@NotNull Enchantment enchantment,
int enchantmentLevel,
int cost) |
Modifier and Type | Method and Description |
---|---|
void |
ItemStack.addEnchantment(@NotNull Enchantment ench,
int level)
Adds the specified
Enchantment to this item stack. |
void |
ItemStack.addUnsafeEnchantment(@NotNull Enchantment ench,
int level)
Adds the specified
Enchantment to this item stack. |
boolean |
ItemStack.containsEnchantment(@NotNull Enchantment ench)
Checks if this ItemStack contains the given
Enchantment |
int |
ItemStack.getEnchantmentLevel(@NotNull Enchantment ench)
Gets the level of the specified enchantment on this item stack
|
int |
ItemStack.removeEnchantment(@NotNull Enchantment ench)
Removes the specified
Enchantment if it exists on this
ItemStack |
Modifier and Type | Method and Description |
---|---|
boolean |
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.
|
Copyright © 2021. All rights reserved.