Class EnchantmentWrapper
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed
,Translatable
,Keyed
Enchantment
s-
Field Summary
Fields inherited from class org.bukkit.enchantments.Enchantment
ARROW_DAMAGE, ARROW_FIRE, ARROW_INFINITE, ARROW_KNOCKBACK, BINDING_CURSE, CHANNELING, DAMAGE_ALL, DAMAGE_ARTHROPODS, DAMAGE_UNDEAD, DEPTH_STRIDER, DIG_SPEED, DURABILITY, FIRE_ASPECT, FROST_WALKER, IMPALING, KNOCKBACK, LOOT_BONUS_BLOCKS, LOOT_BONUS_MOBS, LOYALTY, LUCK, LURE, MENDING, MULTISHOT, OXYGEN, PIERCING, PROTECTION_ENVIRONMENTAL, PROTECTION_EXPLOSIONS, PROTECTION_FALL, PROTECTION_FIRE, PROTECTION_PROJECTILE, QUICK_CHARGE, RIPTIDE, SILK_TOUCH, SOUL_SPEED, SWEEPING_EDGE, SWIFT_SNEAK, THORNS, VANISHING_CURSE, WATER_WORKER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondisplayName
(int level) Deprecated.Get the name of the enchantment with its applied level.Deprecated.Gets the equipment slots where this enchantment is considered "active".float
getDamageIncrease
(int level, EntityCategory entityCategory) Deprecated.Gets the damage increase as a result of the level and entity category specifiedDeprecated.Gets the enchantment bound to this wrapperint
getMaxModifiedCost
(int level) Deprecated.Gets the maximum modified cost of this enchantment at a specific level.int
getMinModifiedCost
(int level) Deprecated.Gets the minimum modified cost of this enchantment at a specific level.Deprecated.Gets the rarity of this enchantment.boolean
Deprecated.Checks if this enchantment can be found in an enchanting table or use to enchant items generated by loot tables.boolean
Deprecated.Checks if this enchantment can be found in villager trades.Deprecated.Gets the translation key.Methods inherited from class org.bukkit.enchantments.Enchantment
canEnchantItem, conflictsWith, getByKey, getByName, getItemTarget, getMaxLevel, getName, getStartLevel, isCursed, isTreasure, values
-
Constructor Details
-
EnchantmentWrapper
protected EnchantmentWrapper()Deprecated.
-
-
Method Details
-
getEnchantment
Deprecated.Gets the enchantment bound to this wrapper- Returns:
- Enchantment
-
displayName
Deprecated.Description copied from class:Enchantment
Get the name of the enchantment with its applied level.If the given
level
is either less than theEnchantment.getStartLevel()
or greater than theEnchantment.getMaxLevel()
, the level may not be shown in the numeral format one may otherwise expect.- Specified by:
displayName
in classEnchantment
- Parameters:
level
- the level of the enchantment to show- Returns:
- the name of the enchantment with
level
applied
-
translationKey
Deprecated.Description copied from interface:net.kyori.adventure.translation.Translatable
Gets the translation key.- Returns:
- the translation key
-
isTradeable
public boolean isTradeable()Deprecated.Description copied from class:Enchantment
Checks if this enchantment can be found in villager trades.- Specified by:
isTradeable
in classEnchantment
- Returns:
- true if the enchantment can be found in trades
-
isDiscoverable
public boolean isDiscoverable()Deprecated.Description copied from class:Enchantment
Checks if this enchantment can be found in an enchanting table or use to enchant items generated by loot tables.- Specified by:
isDiscoverable
in classEnchantment
- Returns:
- true if the enchantment can be found in a table or by loot tables
-
getMinModifiedCost
public int getMinModifiedCost(int level) Deprecated.Description copied from class:Enchantment
Gets the minimum modified cost of this enchantment at a specific level.Note this is not the number of experience levels needed, and does not directly translate to the levels shown in an enchanting table. This value is used in combination with factors such as tool enchantability to determine a final cost. See https://minecraft.wiki/w/Enchanting/Levels for more information.
- Specified by:
getMinModifiedCost
in classEnchantment
- Parameters:
level
- The level of the enchantment- Returns:
- The modified cost of this enchantment
-
getMaxModifiedCost
public int getMaxModifiedCost(int level) Deprecated.Description copied from class:Enchantment
Gets the maximum modified cost of this enchantment at a specific level.Note this is not the number of experience levels needed, and does not directly translate to the levels shown in an enchanting table. This value is used in combination with factors such as tool enchantability to determine a final cost. See https://minecraft.wiki/w/Enchanting/Levels for more information.
- Specified by:
getMaxModifiedCost
in classEnchantment
- Parameters:
level
- The level of the enchantment- Returns:
- The modified cost of this enchantment
-
getRarity
Deprecated.Description copied from class:Enchantment
Gets the rarity of this enchantment.- Specified by:
getRarity
in classEnchantment
- Returns:
- the rarity
-
getDamageIncrease
Deprecated.Description copied from class:Enchantment
Gets the damage increase as a result of the level and entity category specified- Specified by:
getDamageIncrease
in classEnchantment
- Parameters:
level
- the level of enchantmententityCategory
- the category of entity- Returns:
- the damage increase
-
getActiveSlots
Deprecated.Description copied from class:Enchantment
Gets the equipment slots where this enchantment is considered "active".- Specified by:
getActiveSlots
in classEnchantment
- Returns:
- the equipment slots
-