Package net.minestom.server.scoreboard
Record Class Sidebar.NumberFormat
java.lang.Object
java.lang.Record
net.minestom.server.scoreboard.Sidebar.NumberFormat
- Enclosing class:
Sidebar
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNumberFormat(net.minestom.server.scoreboard.Sidebar.NumberFormat.FormatType formatType, Component content) Creates an instance of aNumberFormatrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Sidebar.NumberFormatblank()A number format which has no sidebar score displayedcontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.static @NotNull Sidebar.NumberFormatA number format which lets the sidebar scores be styled with explicit textnet.minestom.server.scoreboard.Sidebar.NumberFormat.FormatTypeReturns the value of theformatTyperecord component.final inthashCode()Returns a hash code value for this object.static @NotNull Sidebar.NumberFormatA number format which lets the sidebar scores be styledfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
NumberFormat
public NumberFormat(net.minestom.server.scoreboard.Sidebar.NumberFormat.FormatType formatType, Component content) Creates an instance of aNumberFormatrecord class.- Parameters:
formatType- the value for theformatTyperecord componentcontent- the value for thecontentrecord component
-
-
Method Details
-
blank
A number format which has no sidebar score displayed- Returns:
- a blank number format
-
styled
A number format which lets the sidebar scores be styled- Parameters:
style- a styled component
-
fixed
A number format which lets the sidebar scores be styled with explicit text- Parameters:
content- the fixed component
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
formatType
public net.minestom.server.scoreboard.Sidebar.NumberFormat.FormatType formatType()Returns the value of theformatTyperecord component.- Returns:
- the value of the
formatTyperecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-