Package org.bukkit

Class Registry.NotARegistry<A extends Keyed>

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

@Internal public abstract static class Registry.NotARegistry<A extends Keyed> extends Object implements Registry<A>
  • Constructor Details

    • NotARegistry

      public NotARegistry()
  • Method Details

    • stream

      public Stream<A> stream()
      Description copied from interface: Registry
      Returns a new stream, which contains all registry items, which are registered to the registry.
      Specified by:
      stream in interface Registry<A extends Keyed>
      Returns:
      a stream of all registry items
    • getKey

      public NamespacedKey getKey(A value)
      Description copied from interface: Registry
      Get the key for this object.

      Some types can exist without being in a registry and such will have no key associated with them. This method will return null.

      Specified by:
      getKey in interface Registry<A extends Keyed>
      Parameters:
      value - the value to get the key of in this registry
      Returns:
      the key for the value or null if not in the registry
      See Also:
    • hasTag

      public boolean hasTag(TagKey<A> key)
      Description copied from interface: Registry
      Checks if this registry has a tag with the given key.
      Specified by:
      hasTag in interface Registry<A extends Keyed>
      Parameters:
      key - the key to check for
      Returns:
      true if this registry has a tag with the given key, false otherwise
      See Also:
    • getTag

      public Tag<A> getTag(TagKey<A> key)
      Description copied from interface: Registry
      Gets the named registry set (tag) for the given key.
      Specified by:
      getTag in interface Registry<A extends Keyed>
      Parameters:
      key - the key to get the tag for
      Returns:
      the tag for the key
      See Also:
    • getTags

      public Collection<Tag<A>> getTags()
      Description copied from interface: Registry
      Gets all the tags in this registry.
      Specified by:
      getTags in interface Registry<A extends Keyed>
      Returns:
      a stream of all tags in this registry