Class ComponentResponseHandler

java.lang.Object
revxrsal.commands.bukkit.adventure.ComponentResponseHandler
All Implemented Interfaces:
ResponseHandler<net.kyori.adventure.text.ComponentLike>

public final class ComponentResponseHandler extends Object implements ResponseHandler<net.kyori.adventure.text.ComponentLike>
Adds support for returning ComponentLike from methods to respond directly to actors.

Use BukkitCommandHandler.enableAdventure() to register.

  • Constructor Details

    • ComponentResponseHandler

      public ComponentResponseHandler(Function<org.bukkit.command.CommandSender,net.kyori.adventure.audience.Audience> audiences)
  • Method Details

    • handleResponse

      public void handleResponse(net.kyori.adventure.text.ComponentLike response, @NotNull @NotNull CommandActor actor, @NotNull @NotNull ExecutableCommand command)
      Description copied from interface: ResponseHandler
      Handles the response returned from the method
      Specified by:
      handleResponse in interface ResponseHandler<net.kyori.adventure.text.ComponentLike>
      Parameters:
      response - The response returned from the method. May or may not be null.
      actor - The actor of the command
      command - The command being executed