Record Class ShieldMeta.Builder

java.lang.Object
java.lang.Record
net.minestom.server.item.metadata.ShieldMeta.Builder
All Implemented Interfaces:
ItemMeta.Builder, ItemMetaView.Builder, Taggable, TagReadable, TagWritable
Enclosing class:
ShieldMeta

public static record ShieldMeta.Builder(@NotNull TagHandler tagHandler) extends Record implements ItemMetaView.Builder
  • Constructor Details

    • Builder

      public Builder()
    • Builder

      public Builder(@NotNull @NotNull TagHandler tagHandler)
      Creates an instance of a Builder record class.
      Parameters:
      tagHandler - the value for the tagHandler record component
  • Method Details

    • baseColor

      @NotNull public ShieldMeta.Builder baseColor(@NotNull @NotNull DyeColor dyeColor)
      Set the color which is used as base color for a shield.
      Parameters:
      dyeColor - the color to set
      Returns:
      the builder instance
    • customName

      @NotNull public ShieldMeta.Builder customName(@NotNull @NotNull Component customName)
      Set name of the marker, unused by Minestom
      Parameters:
      customName - name of the marker
      Returns:
      this
    • patterns

      @NotNull public ShieldMeta.Builder patterns(@NotNull @NotNull List<BannerMeta.Pattern> patterns)
      Set the patterns of the shield
      Parameters:
      patterns - patterns of the shield
      Returns:
      this
    • addPattern

      @NotNull public ShieldMeta.Builder addPattern(BannerMeta.Pattern pattern)
      Add a pattern to the shield
      Parameters:
      pattern - pattern to add
      Returns:
      this
    • removePattern

      @NotNull public ShieldMeta.Builder removePattern(BannerMeta.Pattern pattern)
      Remove a pattern from the shield
      Parameters:
      pattern - pattern to remove
      Returns:
      this
    • clearPatterns

      @NotNull public ShieldMeta.Builder clearPatterns()
      Clears the underlying list which contains the pattern values.
      Returns:
      this
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • tagHandler

      @NotNull public @NotNull TagHandler tagHandler()
      Returns the value of the tagHandler record component.
      Specified by:
      tagHandler in interface Taggable
      Returns:
      the value of the tagHandler record component