Interface ObjectSet<T extends net.minestom.server.registry.ProtocolObject>

Type Parameters:
T - The type of protocol object represented by this set.

public sealed interface ObjectSet<T extends net.minestom.server.registry.ProtocolObject>
A set of some protocol objects. May contain a single element, multiple elements, or a single tag (which itself contains multiple elements).
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    contains(@NotNull net.minestom.server.registry.StaticProtocolObject object)
    Check if this set contains the given object, tested against its namespace id.
    default boolean
     
    boolean
    contains(@NotNull net.minestom.server.utils.NamespaceID namespace)
     
    static <T extends net.minestom.server.registry.ProtocolObject>
    @NotNull ObjectSet<T>
     
    static <T extends net.minestom.server.registry.ProtocolObject>
    @NotNull BinaryTagSerializer<ObjectSet<T>>
     
    static <T extends net.minestom.server.registry.ProtocolObject>
    @NotNull ObjectSet<T>
    of(@NotNull Collection<net.minestom.server.utils.NamespaceID> entries)
     
    static <T extends net.minestom.server.registry.ProtocolObject>
    @NotNull ObjectSet<T>
    of(@NotNull Tag tag)
     
  • Method Details

    • empty

      @NotNull static <T extends net.minestom.server.registry.ProtocolObject> @NotNull ObjectSet<T> empty()
    • of

      @NotNull static <T extends net.minestom.server.registry.ProtocolObject> @NotNull ObjectSet<T> of(@NotNull @NotNull Collection<net.minestom.server.utils.NamespaceID> entries)
    • of

      @NotNull static <T extends net.minestom.server.registry.ProtocolObject> @NotNull ObjectSet<T> of(@NotNull @NotNull Tag tag)
    • nbtType

      @NotNull static <T extends net.minestom.server.registry.ProtocolObject> @NotNull BinaryTagSerializer<ObjectSet<T>> nbtType(@NotNull Tag.BasicType tagType)
    • contains

      default boolean contains(@NotNull @NotNull net.minestom.server.registry.StaticProtocolObject object)

      Check if this set contains the given object, tested against its namespace id.

      Present for compatibility with non-dynamic registries. Will be removed in the future.

      Parameters:
      object - The object to check for.
      Returns:
      True if this set contains the object, false otherwise.
    • contains

      default boolean contains(@NotNull DynamicRegistry.Key<T> key)
    • contains

      boolean contains(@NotNull @NotNull net.minestom.server.utils.NamespaceID namespace)