Package org.skriptlang.skript.lang.entry
Class SectionEntryData
java.lang.Object
org.skriptlang.skript.lang.entry.EntryData<SectionNode>
org.skriptlang.skript.lang.entry.SectionEntryData
A simple entry data class for handling
SectionNodes.-
Constructor Summary
ConstructorsConstructorDescriptionSectionEntryData(String key, @Nullable SectionNode defaultValue, boolean optional) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCreateWith(Node node) Checks whether the provided node can be used as the section for this entry data.@Nullable SectionNodeBecause this entry data is forSectionNodes, no specific handling needs to be done to obtain the "value".Methods inherited from class org.skriptlang.skript.lang.entry.EntryData
getDefaultValue, getKey, isOptional
-
Constructor Details
-
SectionEntryData
-
-
Method Details
-
getValue
Because this entry data is forSectionNodes, no specific handling needs to be done to obtain the "value". This method just asserts that the provided node is actually aSectionNode.- Specified by:
getValuein classEntryData<SectionNode>- Parameters:
node- ASimpleNodeto obtain (and possibly convert) the value of.- Returns:
- The value obtained from the provided
SimpleNode.
-
canCreateWith
Checks whether the provided node can be used as the section for this entry data. A check is done to verify that the node is aSectionNode, and that it also meets the requirements ofEntryData.canCreateWith(Node).- Specified by:
canCreateWithin classEntryData<SectionNode>- Parameters:
node- The node to check.- Returns:
- Whether the provided
Nodeworks with this entry data.
-