Class EnchantmentWrapper
java.lang.Object
fr.andross.banitem.utils.enchantments.EnchantmentWrapper
An enchantment wrapper class that stores the Bukkit enchantment with a level
- Version:
- 3.1
- Author:
- Andross
-
Constructor Summary
ConstructorDescriptionEnchantmentWrapper
(org.bukkit.enchantments.Enchantment enchantment, int level) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static Set<EnchantmentWrapper>
Create a set of this wrapper from a map of enchantementsorg.bukkit.enchantments.Enchantment
Get the Bukkit enchantmentint
getLevel()
Get the level of the enchantmentint
hashCode()
-
Constructor Details
-
EnchantmentWrapper
public EnchantmentWrapper(@NotNull org.bukkit.enchantments.Enchantment enchantment, int level)
-
-
Method Details
-
getEnchantment
@NotNull public org.bukkit.enchantments.Enchantment getEnchantment()Get the Bukkit enchantment- Returns:
- the bukkit enchantment
-
getLevel
public int getLevel()Get the level of the enchantment- Returns:
- the level of the enchantment
-
from
@NotNull public static Set<EnchantmentWrapper> from(@NotNull Map<org.bukkit.enchantments.Enchantment, Integer> map) Create a set of this wrapper from a map of enchantements- Parameters:
map
- map of enchantments- Returns:
- set of this wrapper from the map
-
equals
-
hashCode
public int hashCode()
-