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
SectionNode
s.-
Constructor Summary
ConstructorDescriptionSectionEntryData
(String key, @Nullable SectionNode defaultValue, boolean optional) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canCreateWith
(Node node) Checks whether the provided node can be used as the section for this entry data.@Nullable SectionNode
Because this entry data is forSectionNode
s, 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 forSectionNode
s, no specific handling needs to be done to obtain the "value". This method just asserts that the provided node is actually aSectionNode
.- Specified by:
getValue
in classEntryData<SectionNode>
- Parameters:
node
- ASimpleNode
to 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:
canCreateWith
in classEntryData<SectionNode>
- Parameters:
node
- The node to check.- Returns:
- Whether the provided
Node
works with this entry data.
-