Class CommandUsage

java.lang.Object
ch.njol.skript.command.CommandUsage

public class CommandUsage extends Object
Holds info about the usage of a command. TODO: replace with record when java 17
  • Constructor Details

    • CommandUsage

      public CommandUsage(@Nullable @Nullable VariableString usage, String defaultUsage)
      Parameters:
      usage - The dynamic usage message, can contain expressions.
      defaultUsage - A fallback usage message for use in non-event environments.
  • Method Details

    • getRawUsage

      public VariableString getRawUsage()
      Returns:
      The usage message as a VariableString.
    • getUsage

      public String getUsage()
      Get the usage message without an event to evaluate it.
      Returns:
      The evaluated usage message.
    • getUsage

      public String getUsage(@Nullable @Nullable org.bukkit.event.Event event)
      Parameters:
      event - The event used to evaluate the usage message.
      Returns:
      The evaluated usage message.
    • toString

      public String toString()
      Overrides:
      toString in class Object