Package net.minestom.server.registry
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 Summary
Modifier and TypeMethodDescriptiondefault boolean
contains
(@NotNull StaticProtocolObject object) Check if this set contains the given object, tested against its namespace id.default boolean
contains
(DynamicRegistry.Key<T> key) boolean
contains
(@NotNull NamespaceID namespace) static <T extends ProtocolObject>
@NotNull ObjectSet<T> empty()
static <T extends ProtocolObject>
@NotNull BinaryTagSerializer<ObjectSet<T>> nbtType
(Tag.BasicType tagType) static <T extends ProtocolObject>
@NotNull ObjectSet<T> of
(@NotNull Collection<NamespaceID> entries) static <T extends ProtocolObject>
@NotNull ObjectSet<T>
-
Method Details
-
empty
-
of
@NotNull static <T extends ProtocolObject> @NotNull ObjectSet<T> of(@NotNull @NotNull Collection<NamespaceID> entries) -
of
-
nbtType
@NotNull static <T extends ProtocolObject> @NotNull BinaryTagSerializer<ObjectSet<T>> nbtType(@NotNull Tag.BasicType tagType) -
contains
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
-
contains
-