Class MemorySection
java.lang.Object
com.kamikazejam.kamicommon.yaml.AbstractMemorySection<MemorySection>
com.kamikazejam.kamicommon.yaml.base.MemorySectionMethods<MemorySection>
com.kamikazejam.kamicommon.yaml.spigot.MemorySection
- All Implemented Interfaces:
ConfigurationMethods<ConfigurationSection>
,ConfigurationSection
- Direct Known Subclasses:
YamlConfiguration
public class MemorySection
extends MemorySectionMethods<MemorySection>
implements ConfigurationSection
-
Constructor Summary
ConstructorsConstructorDescriptionMemorySection
(@Nullable org.yaml.snakeyaml.nodes.MappingNode node, @NotNull String fullPath, @Nullable ConfigurationMethods<?> parent) -
Method Summary
Modifier and TypeMethodDescription@NotNull MemorySection
@NotNull ConfigurationSequenceSpigot
getItemStack
(String key) Supported in Spigot-Backed Config classes, you must cast to ItemStack if return is not null.getItemStack
(String key, ItemStack def) boolean
isItemStack
(String key) @NotNull ItemBuilder
parseItemBuilder
(@NotNull String key) Parses the subsection at the given key into anItemBuilder
.void
void
void
setItemStack
(String key, ItemStack stack) Methods inherited from class com.kamikazejam.kamicommon.yaml.base.MemorySectionMethods
addDefault, contains, get, getBigDecimal, getBigDecimal, getBoolean, getBoolean, getByte, getByte, getByteList, getByteList, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getIntegerList, getIntegerList, getKeys, getList, getList, getLong, getLong, getShort, getShort, getString, getString, getStringList, getStringList, isBoolean, isByte, isConfigurationSection, isDouble, isEmpty, isFloat, isInt, isList, isLong, isNumber, isSet, isShort, isString, putBoolean, putByte, putDouble, putFloat, putInt, putInteger, putLong, putShort, putString, save, save, setBoolean, setByte, setDouble, setFloat, setInt, setInteger, setLong, setShort, setString
Methods inherited from class com.kamikazejam.kamicommon.yaml.AbstractMemorySection
contains, getKeyNode, getKeys, getNode, getNodeTuple, getNodeValue, getObject, internalPut, isPrimitiveWrapper, parseBigDecimal, setChanged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.kamikazejam.kamicommon.yaml.base.ConfigurationMethods
addDefault, contains, get, getBigDecimal, getBigDecimal, getBoolean, getBoolean, getByte, getByte, getByteList, getByteList, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getIntegerList, getIntegerList, getKeys, getList, getList, getLong, getLong, getShort, getShort, getString, getString, getStringList, getStringList, isBoolean, isByte, isChanged, isConfigurationSection, isDouble, isEmpty, isFloat, isInt, isList, isLong, isNumber, isSet, isShort, isString, putBoolean, putByte, putDouble, putFloat, putInt, putInteger, putLong, putShort, putString, setBoolean, setByte, setChanged, setDouble, setFloat, setInt, setInteger, setLong, setShort, setString
-
Constructor Details
-
MemorySection
public MemorySection(@Nullable @Nullable org.yaml.snakeyaml.nodes.MappingNode node, @NotNull @NotNull String fullPath, @Nullable @Nullable ConfigurationMethods<?> parent)
-
-
Method Details
-
getConfigurationSection
- Specified by:
getConfigurationSection
in interfaceConfigurationMethods<ConfigurationSection>
-
getConfigurationSequence
- Specified by:
getConfigurationSequence
in interfaceConfigurationMethods<ConfigurationSection>
-
set
- Specified by:
set
in interfaceConfigurationMethods<ConfigurationSection>
- Overrides:
set
in classAbstractMemorySection<MemorySection>
-
put
- Specified by:
put
in interfaceConfigurationMethods<ConfigurationSection>
- Overrides:
put
in classAbstractMemorySection<MemorySection>
-
get
- Specified by:
get
in interfaceConfigurationMethods<ConfigurationSection>
- Overrides:
get
in classMemorySectionMethods<MemorySection>
-
getItemStack
Supported in Spigot-Backed Config classes, you must cast to ItemStack if return is not null.- Specified by:
getItemStack
in interfaceConfigurationSection
- Returns:
- the ItemStack at the given key, or null if it doesn't exist
-
getItemStack
- Specified by:
getItemStack
in interfaceConfigurationSection
-
setItemStack
- Specified by:
setItemStack
in interfaceConfigurationSection
-
isItemStack
- Specified by:
isItemStack
in interfaceConfigurationSection
-
parseItemBuilder
Description copied from interface:ConfigurationSection
Parses the subsection at the given key into anItemBuilder
. This is equivalent to using:
-ItemBuilderLoader.load(ConfigurationSection)
with the subsection at the given key as the argument.- Specified by:
parseItemBuilder
in interfaceConfigurationSection
- Parameters:
key
- The key of the subsection to parse.- Returns:
- The parsed
ItemBuilder
.
-
getCurrentPath
- Specified by:
getCurrentPath
in interfaceConfigurationMethods<ConfigurationSection>
- Specified by:
getCurrentPath
in interfaceConfigurationSection
-