Record Class Contributor

java.lang.Object
java.lang.Record
com.wildfire.client.contributors.Contributor

public record Contributor(int roles, @Nullable net.minecraft.network.chat.TextColor color, @Nullable String name, boolean showInCredits) extends Record
API Note:
Only use this on the client side
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Contributor(int roles, @Nullable net.minecraft.network.chat.TextColor color, @Nullable String name, boolean showInCredits)
    Creates an instance of a Contributor record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
     
    @Nullable net.minecraft.network.chat.TextColor
    Returns the value of the color record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.network.chat.TextColor
     
     
    final int
    Returns a hash code value for this object.
    @Nullable String
    Returns the value of the name record component.
    int
    Returns the value of the roles record component.
    boolean
    Returns the value of the showInCredits record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Contributor

      public Contributor(int roles, @Nullable net.minecraft.network.chat.TextColor color, @Nullable String name, boolean showInCredits)
      Creates an instance of a Contributor record class.
      Parameters:
      roles - the value for the roles record component
      color - the value for the color record component
      name - the value for the name record component
      showInCredits - the value for the showInCredits record component
  • Method Details

    • getColor

      public net.minecraft.network.chat.TextColor getColor()
    • asText

      public net.minecraft.network.chat.Component asText()
    • getRole

      public Contributor.Role getRole()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • roles

      public int roles()
      Returns the value of the roles record component.
      Returns:
      the value of the roles record component
    • color

      public @Nullable net.minecraft.network.chat.TextColor color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • name

      public @Nullable String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • showInCredits

      public boolean showInCredits()
      Returns the value of the showInCredits record component.
      Returns:
      the value of the showInCredits record component