Package net.minecraft.world.scores
Record Class PlayerScoreEntry
java.lang.Object
java.lang.Record
net.minecraft.world.scores.PlayerScoreEntry
public record PlayerScoreEntry(String owner, int value, @Nullable Component display, @Nullable NumberFormat numberFormatOverride)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final ComponentThe field for thedisplayrecord component.private final NumberFormatThe field for thenumberFormatOverriderecord component.private final StringThe field for theownerrecord component.private final intThe field for thevaluerecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerScoreEntry(String owner, int value, Component display, NumberFormat numberFormatOverride) Creates an instance of aPlayerScoreEntryrecord class.
- 
Method SummaryModifier and TypeMethodDescriptiondisplay()Returns the value of thedisplayrecord component.final booleanIndicates whether some other object is "equal to" this one.formatValue(NumberFormat p_313792_) final inthashCode()Returns a hash code value for this object.booleanisHidden()Returns the value of thenumberFormatOverriderecord component.owner()Returns the value of theownerrecord component.final StringtoString()Returns a string representation of this record class.intvalue()Returns the value of thevaluerecord component.
- 
Field Details- 
ownerThe field for theownerrecord component.
- 
valueprivate final int valueThe field for thevaluerecord component.
- 
displayThe field for thedisplayrecord component.
- 
numberFormatOverrideThe field for thenumberFormatOverriderecord component.
 
- 
- 
Constructor Details- 
PlayerScoreEntrypublic PlayerScoreEntry(String owner, int value, @Nullable Component display, @Nullable NumberFormat numberFormatOverride) Creates an instance of aPlayerScoreEntryrecord class.- Parameters:
- owner- the value for the- ownerrecord component
- value- the value for the- valuerecord component
- display- the value for the- displayrecord component
- numberFormatOverride- the value for the- numberFormatOverriderecord component
 
 
- 
- 
Method Details- 
isHiddenpublic boolean isHidden()
- 
ownerName
- 
formatValue
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
ownerReturns the value of theownerrecord component.- Returns:
- the value of the ownerrecord component
 
- 
valuepublic int value()Returns the value of thevaluerecord component.- Returns:
- the value of the valuerecord component
 
- 
displayReturns the value of thedisplayrecord component.- Returns:
- the value of the displayrecord component
 
- 
numberFormatOverrideReturns the value of thenumberFormatOverriderecord component.- Returns:
- the value of the numberFormatOverriderecord component
 
 
-