Class EnchantmentWrapper
- All Implemented Interfaces:
Keyed,Translatable,Keyed,Translatable
Enchantments-
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
Constructors -
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".floatgetDamageIncrease(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 wrapperintgetMaxModifiedCost(int level) Deprecated.Gets the maximum modified cost of this enchantment at a specific level.intgetMinModifiedCost(int level) Deprecated.Gets the minimum modified cost of this enchantment at a specific level.Deprecated.Gets the rarity of this enchantment.booleanDeprecated.Checks if this enchantment can be found in an enchanting table or use to enchant items generated by loot tables.booleanDeprecated.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, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:EnchantmentGet the name of the enchantment with its applied level.If the given
levelis 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:
displayNamein classEnchantment- Parameters:
level- the level of the enchantment to show- Returns:
- the name of the enchantment with
levelapplied
-
translationKey
Deprecated.Description copied from interface:net.kyori.adventure.translation.TranslatableGets the translation key.- Specified by:
translationKeyin interfaceTranslatable- Specified by:
translationKeyin classEnchantment- Returns:
- the translation key
-
isTradeable
public boolean isTradeable()Deprecated.Description copied from class:EnchantmentChecks if this enchantment can be found in villager trades.- Specified by:
isTradeablein classEnchantment- Returns:
- true if the enchantment can be found in trades
-
isDiscoverable
public boolean isDiscoverable()Deprecated.Description copied from class:EnchantmentChecks if this enchantment can be found in an enchanting table or use to enchant items generated by loot tables.- Specified by:
isDiscoverablein 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:EnchantmentGets 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:
getMinModifiedCostin 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:EnchantmentGets 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:
getMaxModifiedCostin classEnchantment- Parameters:
level- The level of the enchantment- Returns:
- The modified cost of this enchantment
-
getRarity
Deprecated.Description copied from class:EnchantmentGets the rarity of this enchantment.- Specified by:
getRarityin classEnchantment- Returns:
- the rarity
-
getDamageIncrease
Deprecated.Description copied from class:EnchantmentGets the damage increase as a result of the level and entity category specified- Specified by:
getDamageIncreasein classEnchantment- Parameters:
level- the level of enchantmententityCategory- the category of entity- Returns:
- the damage increase
-
getActiveSlots
Deprecated.Description copied from class:EnchantmentGets the equipment slots where this enchantment is considered "active".- Overrides:
getActiveSlotsin classEnchantment- Returns:
- the equipment slots
-