Class CommandSuggestionEvent

java.lang.Object
com.sk89q.worldedit.event.Event
com.sk89q.worldedit.event.platform.CommandSuggestionEvent

public class CommandSuggestionEvent extends Event
Posted when suggestions for auto-completion are requested for command input.
  • Constructor Details

    • CommandSuggestionEvent

      public CommandSuggestionEvent(Actor actor, String arguments)
      Create a new instance.
      Parameters:
      actor - the player
      arguments - the arguments
  • Method Details

    • getActor

      public Actor getActor()
      Get the actor that issued the command.
      Returns:
      the actor that issued the command
    • getArguments

      public String getArguments()
      Get the arguments.
      Returns:
      the arguments
    • getSuggestions

      public List<Substring> getSuggestions()
      Get the list of suggestions that are to be presented.

      Each Substring holds the replacement as the substring, and the replacement range as the original substring range.

      Returns:
      the list of suggestions
    • setSuggestions

      public void setSuggestions(List<Substring> suggestions)
      Set the list of suggestions that are to be presented.
      Parameters:
      suggestions - the list of suggestions