Package org.bukkit

Class Registry.SimpleRegistry<T extends Enum<T> & Keyed>

java.lang.Object
org.bukkit.Registry.NotARegistry<T>
org.bukkit.Registry.SimpleRegistry<T>
All Implemented Interfaces:
Iterable<T>, Registry<T>
Enclosing interface:
Registry<T extends Keyed>

@Internal public static class Registry.SimpleRegistry<T extends Enum<T> & Keyed> extends Registry.NotARegistry<T>
  • Constructor Details

    • SimpleRegistry

      protected SimpleRegistry(Class<T> type)
    • SimpleRegistry

      protected SimpleRegistry(Class<T> type, Predicate<T> predicate)
  • Method Details

    • get

      public @Nullable T get(NamespacedKey key)
      Description copied from interface: Registry
      Get the object by its key.
      Parameters:
      key - non-null key
      Returns:
      item or null if it does not exist
    • iterator

      public Iterator<T> iterator()
    • getType

      @Internal @Deprecated(since="1.20.6", forRemoval=true) public Class<T> getType()
      Deprecated, for removal: This API element is subject to removal in a future version.