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 ClassInfos
and Converters.
This data CAN return null if the user's input is unable to be parsed as the expected type.-
Constructor Summary
ConstructorsConstructorDescriptionLiteralEntryData(String key, T defaultValue, boolean optional, Class<T> type) -
Method Summary
Methods inherited from class org.skriptlang.skript.lang.entry.KeyValueEntryData
canCreateWith, getSeparator, getValueMethods 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:KeyValueEntryDataParses a String value using this entry data.- Specified by:
getValuein classKeyValueEntryData<T>- Parameters:
value- The String value to parse.- Returns:
- The parsed value.
-