Interface ObjectSet<T extends ProtocolObject>

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

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

    • empty

      @NotNull static <T extends ProtocolObject> @NotNull ObjectSet<T> empty()
    • of

      @NotNull static <T extends ProtocolObject> @NotNull ObjectSet<T> of(@NotNull @NotNull Collection<net.kyori.adventure.key.Key> entries)
    • of

      @NotNull static <T extends ProtocolObject> @NotNull ObjectSet<T> of(@NotNull @NotNull Tag tag)
    • networkType

      static <T extends ProtocolObject> @NotNull NetworkBuffer.Type<ObjectSet<T>> networkType(@NotNull Tag.BasicType tagType)
    • codec

      @NotNull static <T extends ProtocolObject> @NotNull Codec<ObjectSet<T>> codec(@NotNull Tag.BasicType tagType)
    • contains

      default boolean contains(@NotNull @NotNull 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.kyori.adventure.key.Key namespace)