Class EnchantmentManager
- java.lang.Object
-
- me.boboballoon.enhancedenchantments.manager.EnchantmentManager
-
public final class EnchantmentManager extends Object
A class that deals with registering enchantments
-
-
Constructor Summary
Constructors Constructor Description EnchantmentManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enchantment
getEnchantment(String name)
Returns the enchantment that has the name you putSet<Enchantment>
getEnchantments()
Returns a copy set of all active enchantmentsSet<Enchantment>
getEnchantments(EnchantmentTier tier)
Returns all registered enchantments from the specified tiervoid
registerEnchantments(Enchantment... enchantments)
Registers enchantments to be loaded/functional in-gamevoid
unregisterEnchantments(String... names)
Unregisters enchantments that are loaded/functional in-gamevoid
unregisterEnchantments(Enchantment... enchantments)
Unregisters enchantments that are loaded/functional in-game
-
-
-
Method Detail
-
registerEnchantments
public void registerEnchantments(Enchantment... enchantments)
Registers enchantments to be loaded/functional in-game- Parameters:
enchantments
- all of the enchantments you wish to register
-
unregisterEnchantments
public void unregisterEnchantments(Enchantment... enchantments)
Unregisters enchantments that are loaded/functional in-game- Parameters:
enchantments
- all of the enchantments you wish to unregister
-
unregisterEnchantments
public void unregisterEnchantments(String... names)
Unregisters enchantments that are loaded/functional in-game- Parameters:
names
- all of the names of the enchantments you wish to unregister
-
getEnchantment
public Enchantment getEnchantment(String name)
Returns the enchantment that has the name you put- Parameters:
name
- the name of the enchantment- Returns:
- the enchantment, null if enchantment is not registered or does not exist
-
getEnchantments
public Set<Enchantment> getEnchantments(EnchantmentTier tier)
Returns all registered enchantments from the specified tier- Parameters:
tier
- the specified tier- Returns:
- all registered enchantments from the specified tier
-
getEnchantments
public Set<Enchantment> getEnchantments()
Returns a copy set of all active enchantments- Returns:
- a copy set of all active enchantments
-
-