Package ch.njol.skript.classes.registry
Class RegistryParser<R extends org.bukkit.Keyed>
java.lang.Object
ch.njol.skript.classes.Parser<R>
ch.njol.skript.classes.registry.RegistryParser<R>
- Type Parameters:
R
- Registry class
A parser based on a
Registry
used to parse data from a string or turn data into a string.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionparse
(String input, @NotNull ParseContext context) This method attempts to match the string input against one of the string representations of the registry.@NotNull String
This method returns the string representation of a registry.@NotNull String
toVariableNameString
(R object) Returns a registry object's string representation in a variable name.Methods inherited from class ch.njol.skript.classes.Parser
canParse, getDebugMessage, toCommandString, toString
-
Constructor Details
-
RegistryParser
-
-
Method Details
-
parse
This method attempts to match the string input against one of the string representations of the registry. -
toString
This method returns the string representation of a registry. -
toVariableNameString
Returns a registry object's string representation in a variable name.- Specified by:
toVariableNameString
in classParser<R extends org.bukkit.Keyed>
- Parameters:
object
- Object to represent in a variable name.- Returns:
- The given object's representation in a variable name.
-
getAllNames
- Returns:
- A comma-separated string containing a list of all names representing the registry. Note that some entries may represent the same registry object.
-