java.lang.Object
net.minestom.server.gamedata.tags.Tag

public final class Tag extends Object
Represents a group of items, blocks, fluids, entity types or function. Immutable by design
  • Constructor Details

    • Tag

      public Tag(NamespaceID name)
      Creates a new empty tag. This does not cache the tag.
    • Tag

      public Tag(NamespaceID name, Set<NamespaceID> values)
      Creates a new tag with the given values. This does not cache the tag.
  • Method Details

    • contains

      public boolean contains(NamespaceID id)
      Checks whether the given id in inside this tag.
      Parameters:
      id - the id to check against
      Returns:
      'true' iif this tag contains the given id
    • getValues

      public Set<NamespaceID> getValues()
      Returns an immutable set of values present in this tag
      Returns:
      immutable set of values present in this tag
    • getName

      public NamespaceID getName()
      Returns the name of this tag