Record Class FeedbackImpl
java.lang.Object
java.lang.Record
com.thewinterframework.configurate.feedback.FeedbackImpl
- All Implemented Interfaces:
Feedback,FeedbackMediaContainer
public record FeedbackImpl(List<FeedbackMedia> medias)
extends Record
implements Feedback, FeedbackMediaContainer
-
Constructor Summary
ConstructorsConstructorDescriptionFeedbackImpl(List<FeedbackMedia> medias) Creates an instance of aFeedbackImplrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull List<net.kyori.adventure.text.Component> asComponents(net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) Converts the feedback to a list of components.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.medias()Returns the value of themediasrecord component.voidsend(net.kyori.adventure.audience.Audience audience, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) Sends the feedback to the specifiedAudience.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.thewinterframework.configurate.feedback.Feedback
asComponent, sendFeedback
-
Constructor Details
-
FeedbackImpl
Creates an instance of aFeedbackImplrecord class.- Parameters:
medias- the value for themediasrecord component
-
-
Method Details
-
send
public void send(net.kyori.adventure.audience.Audience audience, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) Description copied from interface:FeedbackSends the feedback to the specifiedAudience. -
asComponents
@NotNull public @NotNull List<net.kyori.adventure.text.Component> asComponents(net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) throws IllegalStateException Description copied from interface:FeedbackConverts the feedback to a list of components.- Specified by:
asComponentsin interfaceFeedback- Parameters:
resolver- the tag resolvers to use- Returns:
- the list of component representation of the feedback
- Throws:
IllegalStateException- if the feedback cannot be converted to components
-
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). -
medias
Returns the value of themediasrecord component.- Specified by:
mediasin interfaceFeedbackMediaContainer- Returns:
- the value of the
mediasrecord component
-