Class LiteralEntryData<T>
java.lang.Object
org.skriptlang.skript.lang.entry.EntryData<T>
org.skriptlang.skript.lang.entry.KeyValueEntryData<T>
org.skriptlang.skript.lang.entry.util.LiteralEntryData<T>
A specific
KeyValueEntryData
type designed to parse the
entry's value as a supported literal type.
This entry makes use of Classes.parse(String, Class, ParseContext)
to parse the user's input using registered ClassInfo
s
and Converter
s.
This data CAN return null if the user's input is unable to be parsed as the expected type.-
Constructor Summary
ConstructorDescriptionLiteralEntryData
(String key, T defaultValue, boolean optional, Class<T> type) -
Method Summary
Methods inherited from class org.skriptlang.skript.lang.entry.KeyValueEntryData
canCreateWith, getSeparator, getValue
Methods inherited from class org.skriptlang.skript.lang.entry.EntryData
getDefaultValue, getKey, isOptional
-
Constructor Details
-
LiteralEntryData
- Parameters:
type
- The type to parse the value into.
-
-
Method Details
-
getValue
Description copied from class:KeyValueEntryData
Parses a String value using this entry data.- Specified by:
getValue
in classKeyValueEntryData<T>
- Parameters:
value
- The String value to parse.- Returns:
- The parsed value.
-