Class PlayerClassInfo.PlayerParser
java.lang.Object
ch.njol.skript.classes.Parser<org.bukkit.entity.Player>
org.skriptlang.skript.bukkit.base.types.PlayerClassInfo.PlayerParser
- Enclosing class:
PlayerClassInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanParse(ParseContext context) getDebugMessage(org.bukkit.entity.Player player) Returns a string representation of the given object to be used for debugging.
The Parser of 'Block' for example returns the block's type in toString, while this method also returns the coordinates of the block.
The default implementation of this method returnstoString(o, 0).@Nullable org.bukkit.entity.Playerparse(String string, ParseContext context) Parses the input.toString(org.bukkit.entity.Player player, int flags) Returns a string representation of the given object to be used in messages.toVariableNameString(org.bukkit.entity.Player player) Returns an object's string representation in a variable name.Methods inherited from class ch.njol.skript.classes.Parser
toCommandString, toString
-
Constructor Details
-
PlayerParser
public PlayerParser()
-
-
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.
-
canParse
- Overrides:
canParsein classParser<org.bukkit.entity.Player>- Returns:
- Whether
Parser.parse(String, ParseContext)can actually return something other that null for the given context
-
toString
Description copied from class:ParserReturns a string representation of the given object to be used in messages. -
toVariableNameString
Description copied from class:ParserReturns an object's string representation in a variable name.- Specified by:
toVariableNameStringin classParser<org.bukkit.entity.Player>- Parameters:
player-- Returns:
- The given object's representation in a variable name.
-
getDebugMessage
Description copied from class:ParserReturns a string representation of the given object to be used for debugging.
The Parser of 'Block' for example returns the block's type in toString, while this method also returns the coordinates of the block.
The default implementation of this method returnstoString(o, 0).- Overrides:
getDebugMessagein classParser<org.bukkit.entity.Player>- Parameters:
player-- Returns:
- A message containing debug information about the given object
-