Class EntityTypeClassInfo.EntityTypeParser
java.lang.Object
ch.njol.skript.classes.Parser<EntityType>
org.skriptlang.skript.bukkit.entity.EntityTypeClassInfo.EntityTypeParser
- Enclosing class:
EntityTypeClassInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable EntityTypeparse(String string, ParseContext context) Parses the input.toString(EntityType entityType, int flags) Returns a string representation of the given object to be used in messages.toVariableNameString(EntityType entityType) Returns an object's string representation in a variable name.Methods inherited from class Parser
canParse, getDebugMessage, toCommandString, toString
-
Constructor Details
-
EntityTypeParser
public EntityTypeParser()
-
-
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.
- Overrides:
parsein classParser<EntityType>- Parameters:
string- The String to parse. This string is already trim()med.context- Context of parsing, may not be null- Returns:
- The parsed input or null if the input is invalid for this parser.
-
toString
Description copied from class:ParserReturns a string representation of the given object to be used in messages.- Specified by:
toStringin classParser<EntityType>- Parameters:
entityType- The object. This will never benull.- Returns:
- The String representation of the object.
- See Also:
-
toVariableNameString
Description copied from class:ParserReturns an object's string representation in a variable name.- Specified by:
toVariableNameStringin classParser<EntityType>- Parameters:
entityType-- Returns:
- The given object's representation in a variable name.
-