Class EnumParser<E extends Enum<E>>
java.lang.Object
ch.njol.skript.classes.Parser<E>
ch.njol.skript.classes.PatternedParser<E>
ch.njol.skript.classes.EnumParser<E>
-
Field Summary
FieldsFields inherited from interface Converter
ALL_CHAINING, ALLOW_UNSAFE_CASTS, NO_CHAINING, NO_LEFT_CHAINING, NO_RIGHT_CHAINING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts an object using this Converter.String[]Get all literal patterns.parse(String string, ParseContext context) Parses the input.Returns a string representation of the given object to be used in messages.toVariableNameString(E object) Returns an object's string representation in a variable name.Methods inherited from class PatternedParser
getCombinedPatternsMethods inherited from class Parser
canParse, getDebugMessage, toCommandString, toString
-
Field Details
-
parseMap
-
-
Constructor Details
-
EnumParser
-
-
Method Details
-
parse
Description copied from class:ParserParses the input. This method may print an error prior to returning null if the input couldn't be parsed.Remember to override
Parser.canParse(ParseContext)if this parser doesn't parse at all (i.e. you only use it's toString methods) or only parses for certain contexts.Note that this method will be called very frequently during script parsing, so try to avoid computationally expensive operations in this method when possible.
-
convert
-
toVariableNameString
-
getPatterns
Description copied from class:PatternedParserGet all literal patterns.- Specified by:
getPatternsin classPatternedParser<E extends Enum<E>>
-
toString
Description copied from class:ParserReturns a string representation of the given object to be used in messages.
-