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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    get()
     
    org.cloudburstmc.api.enchantment.behavior.EnchantmentBehavior
    getBehavior​(org.cloudburstmc.api.enchantment.EnchantmentType type)
     
    org.cloudburstmc.api.enchantment.EnchantmentInstance
    getEnchantment​(org.cloudburstmc.api.enchantment.EnchantmentType type)
     
    org.cloudburstmc.api.enchantment.EnchantmentInstance
    getEnchantment​(org.cloudburstmc.api.enchantment.EnchantmentType type, int level)
     
    org.cloudburstmc.api.enchantment.EnchantmentType
    getType​(short id)
     
    org.cloudburstmc.api.enchantment.EnchantmentType
    getType​(org.cloudburstmc.api.util.Identifier id)
     
    void
    register​(@NonNull org.cloudburstmc.api.enchantment.EnchantmentType type, org.cloudburstmc.api.enchantment.behavior.EnchantmentBehavior behavior)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EnchantmentRegistry

      public EnchantmentRegistry()
  • Method Details

    • get

      public static EnchantmentRegistry 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:
      close in interface org.cloudburstmc.api.registry.Registry
      Throws:
      org.cloudburstmc.api.registry.RegistryException