Class CommandParsingData
java.lang.Object
ch.njol.skript.lang.parser.ParserInstance.Data
org.skriptlang.skript.bukkit.command.custom.CommandParsingData
Parsing data holding command context.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<ArgumentData<?>> <T> TgetExecutorData(Function<CommandParsingData.ExecutorData, T> function) Obtains the first non-null instance of a value from the pushed executors.booleanisEmpty()voidRemoves the last pushed arguments from this data.voidRemoves the last pushed choices from this data.voidRemoves the last pushed executor data from this data.voidpushArguments(List<ArgumentData<?>> arguments) Pushes arguments to this data.voidpushChoices(List<Set<String>> choices) Pushes choices to this data.voidpushExecutorData(CommandParsingData.ExecutorData executorData) Pushes executor data to this data.Methods inherited from class ParserInstance.Data
getParser, onCurrentEventsChange, onCurrentScriptChange
-
Field Details
-
isParsingCooldownEntry
public boolean isParsingCooldownEntry
-
-
Constructor Details
-
CommandParsingData
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Returns:
- Whether this parsing data contains any data.
-
getArguments
- Returns:
- Arguments currently stored on this data, in declaration order.
-
pushArguments
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
-
pushChoices
-
popChoices
public void popChoices()Removes the last pushed choices from this data.- See Also:
-
pushExecutorData
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
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.
-