Class TagSet.Builder<T extends Keyed>

java.lang.Object
dev.wyck.tags.TagSet.Builder<T>
Type Parameters:
T - the Bukkit type of the elements
Enclosing interface:
TagSet<T extends Keyed>

@AsOf("3.1.0") public static final class TagSet.Builder<T extends Keyed> extends Object
Creates a new builder.
Since:
3.1.0
  • Constructor Details

    • Builder

      public Builder()
    • Builder

      public Builder(RegistryId registry)
    • Builder

      public Builder(TagSet<T> tagSet)
  • Method Details

    • resourceKey

      @AsOf("3.1.0") public TagSet.Builder<T> resourceKey(ResourceKey resourceKey)
      Sets the resource key of the tag set.
      Parameters:
      resourceKey - the resource key of the tag set
      Returns:
      this builder
      Since:
      3.1.0
    • registry

      @AsOf("3.1.0") public TagSet.Builder<T> registry(RegistryId registry)
      Sets the registry discriminator of the tag set.
      Parameters:
      registry - the registry discriminator of the tag set
      Returns:
      this builder
      Since:
      3.1.0
    • values

      @AsOf("3.1.0") public TagSet.Builder<T> values(Set<T> value)
      Sets the value of the tag set.
      Parameters:
      value - the value of the tag set
      Returns:
      this builder
      Since:
      3.1.0
    • values

      @AsOf("3.1.0") public TagSet.Builder<T> values(TagKey value)
      Sets the value of the tag set.
      Parameters:
      value - the value of the tag set
      Returns:
      this builder
      Since:
      3.1.0
    • values

      @AsOf("3.1.0") public TagSet.Builder<T> values(T... value)
      Sets the value of the tag set.
      Parameters:
      value - the value of the tag set
      Returns:
      this builder
      Since:
      3.1.0
    • value

      @AsOf("3.1.0") public TagSet.Builder<T> value(T value)
      Sets the value of the tag set.
      Parameters:
      value - the value of the tag set
      Returns:
      this builder
      Since:
      3.1.0
    • value

      @AsOf("3.1.0") public TagSet.Builder<T> value(ResourceKey tagKey)
      Sets the value of the tag set.
      Parameters:
      tagKey - the key of the tag set
      Returns:
      this builder
      Since:
      3.1.0
    • value

      @AsOf("3.1.0") public TagSet.Builder<T> value(Tag<Material> tag)
      Sets the value of the tag set.
      Parameters:
      tag - the tag set
      Returns:
      this builder
      Since:
      3.1.0
    • value

      @AsOf("3.1.0") public TagSet.Builder<T> value(TagSet<T> tagSet)
      Sets the value of the tag set.
      Parameters:
      tagSet - the tag set
      Returns:
      this builder
      Since:
      3.1.0
    • build

      @AsOf("3.1.0") public TagSet<T> build()
      Builds a new tag set.
      Returns:
      the new tag set
      Since:
      3.1.0
    • register

      @AsOf("3.1.0") public TagSet<T> register()
      Registers the tag set to the registry.
      Returns:
      the registered tag set
      Since:
      3.1.0