Record Class FinalMessageRecord
java.lang.Object
java.lang.Record
com.winterhavenmc.library.messagebuilder.model.language.FinalMessageRecord
- Record Components:
key
- the original message keyenabled
- whether this message is activemessage
- the original raw message string (pre-resolution)repeatDelay
- the repeat delay setting for this messagetitle
- the raw title stringtitleFadeIn
- title fade-in time in tickstitleStay
- title stay time in tickstitleFadeOut
- title fade-out time in tickssubtitle
- the raw subtitle stringfinalMessageString
- the resolved chat message string, if availablefinalTitleString
- the resolved title string, if availablefinalSubtitleString
- the resolved subtitle string, if available
- All Implemented Interfaces:
MessageRecord
,SectionRecord
public record FinalMessageRecord(RecordKey key, boolean enabled, String message, Duration repeatDelay, String title, int titleFadeIn, int titleStay, int titleFadeOut, String subtitle, Optional<String> finalMessageString, Optional<String> finalTitleString, Optional<String> finalSubtitleString)
extends Record
implements MessageRecord
A
MessageRecord
representing a fully constructed, macro-resolved message
ready for delivery to a recipient.
This record is typically derived from a ValidMessageRecord
using the
ValidMessageRecord.withFinalStrings(String, String, String)
method.
It retains all original message metadata while attaching resolved versions of
the chat message, title, and subtitle strings.
Resolved Fields
The following fields contain the final rendered output after macro resolution:finalMessageString
– The resolved chat messagefinalTitleString
– The resolved title (if any)finalSubtitleString
– The resolved subtitle (if any)
Optional
values to distinguish between
unresolved and empty content.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.winterhavenmc.library.messagebuilder.model.language.MessageRecord
MessageRecord.Field
-
Constructor Summary
ConstructorsConstructorDescriptionFinalMessageRecord
(RecordKey key, boolean enabled, String message, Duration repeatDelay, String title, int titleFadeIn, int titleStay, int titleFadeOut, String subtitle, Optional<String> finalMessageString, Optional<String> finalTitleString, Optional<String> finalSubtitleString) Creates an instance of aFinalMessageRecord
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
enabled()
Returns the value of theenabled
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefinalMessageString
record component.Returns the value of thefinalSubtitleString
record component.Returns the value of thefinalTitleString
record component.final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.message()
Returns the value of themessage
record component.Returns the value of therepeatDelay
record component.subtitle()
Returns the value of thesubtitle
record component.title()
Returns the value of thetitle
record component.int
Returns the value of thetitleFadeIn
record component.int
Returns the value of thetitleFadeOut
record component.int
Returns the value of thetitleStay
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
FinalMessageRecord
public FinalMessageRecord(RecordKey key, boolean enabled, String message, Duration repeatDelay, String title, int titleFadeIn, int titleStay, int titleFadeOut, String subtitle, Optional<String> finalMessageString, Optional<String> finalTitleString, Optional<String> finalSubtitleString) Creates an instance of aFinalMessageRecord
record class.- Parameters:
key
- the value for thekey
record componentenabled
- the value for theenabled
record componentmessage
- the value for themessage
record componentrepeatDelay
- the value for therepeatDelay
record componenttitle
- the value for thetitle
record componenttitleFadeIn
- the value for thetitleFadeIn
record componenttitleStay
- the value for thetitleStay
record componenttitleFadeOut
- the value for thetitleFadeOut
record componentsubtitle
- the value for thesubtitle
record componentfinalMessageString
- the value for thefinalMessageString
record componentfinalTitleString
- the value for thefinalTitleString
record componentfinalSubtitleString
- the value for thefinalSubtitleString
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
key
Returns the value of thekey
record component.- Specified by:
key
in interfaceSectionRecord
- Returns:
- the value of the
key
record component
-
enabled
public boolean enabled()Returns the value of theenabled
record component.- Returns:
- the value of the
enabled
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-
repeatDelay
Returns the value of therepeatDelay
record component.- Returns:
- the value of the
repeatDelay
record component
-
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
titleFadeIn
public int titleFadeIn()Returns the value of thetitleFadeIn
record component.- Returns:
- the value of the
titleFadeIn
record component
-
titleStay
public int titleStay()Returns the value of thetitleStay
record component.- Returns:
- the value of the
titleStay
record component
-
titleFadeOut
public int titleFadeOut()Returns the value of thetitleFadeOut
record component.- Returns:
- the value of the
titleFadeOut
record component
-
subtitle
Returns the value of thesubtitle
record component.- Returns:
- the value of the
subtitle
record component
-
finalMessageString
Returns the value of thefinalMessageString
record component.- Returns:
- the value of the
finalMessageString
record component
-
finalTitleString
Returns the value of thefinalTitleString
record component.- Returns:
- the value of the
finalTitleString
record component
-
finalSubtitleString
Returns the value of thefinalSubtitleString
record component.- Returns:
- the value of the
finalSubtitleString
record component
-