Class CommandParsingData

java.lang.Object
ch.njol.skript.lang.parser.ParserInstance.Data
org.skriptlang.skript.bukkit.command.custom.CommandParsingData

public final class CommandParsingData extends ParserInstance.Data
Parsing data holding command context.
  • Field Details

    • isParsingCooldownEntry

      public boolean isParsingCooldownEntry
  • Constructor Details

    • CommandParsingData

      public CommandParsingData(ParserInstance parserInstance)
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Returns:
      Whether this parsing data contains any data.
    • getArguments

      public List<ArgumentData<?>> getArguments()
      Returns:
      Arguments currently stored on this data, in declaration order.
    • pushArguments

      public void pushArguments(List<ArgumentData<?>> arguments)
      Pushes arguments to this data.
      Parameters:
      arguments - The arguments to push.
      See Also:
    • popArguments

      public void popArguments()
      Removes the last pushed arguments from this data.
      See Also:
    • getChoices

      public List<Set<String>> getChoices()
      Returns:
      All choice groups currently stored on this data, in declaration order.
    • pushChoices

      public void pushChoices(List<Set<String>> choices)
      Pushes choices to this data.
      Parameters:
      choices - The choices to push.
      See Also:
    • popChoices

      public void popChoices()
      Removes the last pushed choices from this data.
      See Also:
    • pushExecutorData

      public void pushExecutorData(CommandParsingData.ExecutorData executorData)
      Pushes executor data to this data.
      Parameters:
      executorData - The data to push.
      See Also:
    • popExecutorData

      public void popExecutorData()
      Removes the last pushed executor data from this data.
      See Also:
    • getExecutorData

      @Nullable public <T> T getExecutorData(Function<CommandParsingData.ExecutorData, T> function)
      Obtains the first non-null instance of a value from the pushed executors.
      Parameters:
      function - A function to obtain the desired value from the data.
      Returns:
      The value, or null if it was never set.