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 Type
    Method
    Description
    default @NotNull net.kyori.adventure.text.Component
    asComponent(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 Feedback
    path(String path)
    Gets a feedback from the specified path.
    static Feedback
    plain(String message)
    Creates a feedback that sends a component message to the audience.
    static Feedback
    plain(net.kyori.adventure.text.Component message)
    Creates a feedback that sends a component message to the audience.
    void
    send(net.kyori.adventure.audience.Audience audience, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolver)
    Sends the feedback to the specified Audience.
    default void
    sendFeedback(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 specified Audience.
      Parameters:
      audience - the audience to send the feedback to
      resolver - 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 specified Audience.
      Parameters:
      audience - the audience to send the feedback to
      resolver - 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

      static Feedback plain(net.kyori.adventure.text.Component message)
      Creates a feedback that sends a component message to the audience.
      Parameters:
      message - the message to send
      Returns:
      the created feedback
    • plain

      static Feedback plain(String message)
      Creates a feedback that sends a component message to the audience.
      Parameters:
      message - the message to send
      Returns:
      the created feedback
    • path

      static Feedback path(String path)
      Gets a feedback from the specified path.
      Parameters:
      path - the path to get the feedback from
      Returns:
      the feedback