Package org.skriptlang.skript.lang.entry
Class ContainerEntryData
java.lang.Object
org.skriptlang.skript.lang.entry.EntryData<EntryContainer>
org.skriptlang.skript.lang.entry.ContainerEntryData
An entry data for handling a
SectionNode
as the root node of another EntryValidator
.
This enables nested entry data validation.-
Constructor Summary
ConstructorsConstructorDescriptionContainerEntryData
(String key, boolean optional, EntryValidator entryValidator) ContainerEntryData
(String key, boolean optional, EntryValidator.EntryValidatorBuilder validatorBuilder) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canCreateWith
(Node node) A method to be implemented by all entry data classes that determines whether the provided node may be used with the entry data type to obtain a value.@Nullable EntryContainer
Obtains a value from the provided node using the methods of this entry data.Methods inherited from class org.skriptlang.skript.lang.entry.EntryData
getDefaultValue, getKey, isOptional
-
Constructor Details
-
ContainerEntryData
-
ContainerEntryData
public ContainerEntryData(String key, boolean optional, EntryValidator.EntryValidatorBuilder validatorBuilder)
-
-
Method Details
-
getEntryValidator
-
getValue
Description copied from class:EntryData
Obtains a value from the provided node using the methods of this entry data.- Specified by:
getValue
in classEntryData<EntryContainer>
- Parameters:
node
- The node to obtain a value from.- Returns:
- The value obtained from the provided node.
-
canCreateWith
Description copied from class:EntryData
A method to be implemented by all entry data classes that determines whether the provided node may be used with the entry data type to obtain a value.- Specified by:
canCreateWith
in classEntryData<EntryContainer>
- Parameters:
node
- The node to check.- Returns:
- Whether the provided node may be used with this entry data to obtain a value.
-