Class EnchantmentWrapper
- All Implemented Interfaces:
Keyed
,Translatable
,Keyed
,Translatable
Enchantment
s-
Field Summary
Fields inherited from class org.bukkit.enchantments.Enchantment
AQUA_AFFINITY, BANE_OF_ARTHROPODS, BINDING_CURSE, BLAST_PROTECTION, BREACH, CHANNELING, DENSITY, DEPTH_STRIDER, EFFICIENCY, FEATHER_FALLING, FIRE_ASPECT, FIRE_PROTECTION, FLAME, FORTUNE, FROST_WALKER, IMPALING, INFINITY, KNOCKBACK, LOOTING, LOYALTY, LUCK_OF_THE_SEA, LURE, MENDING, MULTISHOT, PIERCING, POWER, PROJECTILE_PROTECTION, PROTECTION, PUNCH, QUICK_CHARGE, RESPIRATION, RIPTIDE, SHARPNESS, SILK_TOUCH, SMITE, SOUL_SPEED, SWEEPING_EDGE, SWIFT_SNEAK, THORNS, UNBREAKING, VANISHING_CURSE, WIND_BURST
-
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, description, getActiveSlotGroups, getAnvilCost, getByKey, getByName, getDamageIncrease, getExclusiveWith, getItemTarget, getMaxLevel, getName, getPrimaryItems, getStartLevel, getSupportedItems, getWeight, isCursed, isTreasure, values
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bukkit.Translatable
getTranslationKey
-
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.- Specified by:
translationKey
in interfaceTranslatable
- Specified by:
translationKey
in classEnchantment
- 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".- Overrides:
getActiveSlots
in classEnchantment
- Returns:
- the equipment slots
-