Package org.cloudburstmc.server.registry
Class EnchantmentRegistry
java.lang.Object
org.cloudburstmc.server.registry.EnchantmentRegistry
- All Implemented Interfaces:
org.cloudburstmc.api.registry.Registry
@Singleton
public class EnchantmentRegistry
extends Object
implements org.cloudburstmc.api.registry.Registry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static EnchantmentRegistryget()org.cloudburstmc.api.enchantment.behavior.EnchantmentBehaviorgetBehavior(org.cloudburstmc.api.enchantment.EnchantmentType type)org.cloudburstmc.api.enchantment.EnchantmentInstancegetEnchantment(org.cloudburstmc.api.enchantment.EnchantmentType type)org.cloudburstmc.api.enchantment.EnchantmentInstancegetEnchantment(org.cloudburstmc.api.enchantment.EnchantmentType type, int level)org.cloudburstmc.api.enchantment.EnchantmentTypegetType(short id)org.cloudburstmc.api.enchantment.EnchantmentTypegetType(org.cloudburstmc.api.util.Identifier id)voidregister(@NonNull org.cloudburstmc.api.enchantment.EnchantmentType type, org.cloudburstmc.api.enchantment.behavior.EnchantmentBehavior behavior)
-
Constructor Details
-
EnchantmentRegistry
public EnchantmentRegistry()
-
-
Method Details
-
get
-
register
public void register(@NonNull @NonNull org.cloudburstmc.api.enchantment.EnchantmentType type, @Nonnull org.cloudburstmc.api.enchantment.behavior.EnchantmentBehavior behavior) -
getEnchantment
public org.cloudburstmc.api.enchantment.EnchantmentInstance getEnchantment(@Nonnull org.cloudburstmc.api.enchantment.EnchantmentType type) -
getEnchantment
public org.cloudburstmc.api.enchantment.EnchantmentInstance getEnchantment(@Nonnull org.cloudburstmc.api.enchantment.EnchantmentType type, int level) -
getBehavior
public org.cloudburstmc.api.enchantment.behavior.EnchantmentBehavior getBehavior(@Nonnull org.cloudburstmc.api.enchantment.EnchantmentType type) -
getType
public org.cloudburstmc.api.enchantment.EnchantmentType getType(short id) -
getType
public org.cloudburstmc.api.enchantment.EnchantmentType getType(org.cloudburstmc.api.util.Identifier id) -
close
public void close() throws org.cloudburstmc.api.registry.RegistryException- Specified by:
closein interfaceorg.cloudburstmc.api.registry.Registry- Throws:
org.cloudburstmc.api.registry.RegistryException
-