Interface Feedback
- All Known Implementing Classes:
FeedbackImpl
@ConfigSerializable
public interface Feedback
Represents a feedback type that can be sent to an
Audience.-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull net.kyori.adventure.text.ComponentasComponent(net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) Converts the feedback to a component.@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.static FeedbackGets a feedback from the specified path.static FeedbackCreates a feedback that sends a component message to the audience.static Feedbackplain(net.kyori.adventure.text.Component message) Creates a feedback that sends a component message to the audience.voidsend(net.kyori.adventure.audience.Audience audience, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) Sends the feedback to the specifiedAudience.default voidsendFeedback(net.kyori.adventure.audience.Audience audience, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) Deprecated.
-
Method Details
-
sendFeedback
@Deprecated @ScheduledForRemoval(inVersion="2.0.0") default void sendFeedback(net.kyori.adventure.audience.Audience audience, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) Deprecated.Sends the feedback to the specifiedAudience.- Parameters:
audience- the audience to send the feedback toresolver- the tag resolvers to use
-
send
void send(net.kyori.adventure.audience.Audience audience, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) Sends the feedback to the specifiedAudience.- Parameters:
audience- the audience to send the feedback toresolver- the tag resolvers to use
-
asComponent
@NotNull default @NotNull net.kyori.adventure.text.Component asComponent(net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) throws IllegalStateException Converts the feedback to a component.- Parameters:
resolver- the tag resolvers to use- Returns:
- the component representation of the feedback
- Throws:
IllegalStateException- if the feedback cannot be converted to a component
-
asComponents
@NotNull @NotNull List<net.kyori.adventure.text.Component> asComponents(net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver) throws IllegalStateException Converts the feedback to a list of components.- 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
-
plain
Creates a feedback that sends a component message to the audience.- Parameters:
message- the message to send- Returns:
- the created feedback
-
plain
Creates a feedback that sends a component message to the audience.- Parameters:
message- the message to send- Returns:
- the created feedback
-
path
Gets a feedback from the specified path.- Parameters:
path- the path to get the feedback from- Returns:
- the feedback
-