Class VelocityDataMemory
java.lang.Object
me.a8kj.config.template.memory.impl.GenericMapDataMemory<String>
me.a8kj.config.template.memory.impl.VelocityDataMemory
- All Implemented Interfaces:
DataMemory<String>
Velocity-specific implementation of
GenericMapDataMemory.
This class extends the standard generic memory to provide native support for Kyori Adventure Components and legacy color formatting.
- Since:
- 0.2
- Author:
- a8kj7sea
-
Field Summary
Fields inherited from class me.a8kj.config.template.memory.impl.GenericMapDataMemory
storage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.text.ComponentgetComponent(String key) A specialized version of transform that directly returns a Component.net.kyori.adventure.text.ComponentgetComponent(String key, Replacement... replacements) Retrieves a value as a KyoriComponentwith legacy color support.Methods inherited from class me.a8kj.config.template.memory.impl.GenericMapDataMemory
clear, contains, get, getBoolean, getDouble, getInt, getKeys, getString, getStringList, set, transformMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.a8kj.config.template.memory.DataMemory
get, getOptional, getProcessor, getString, getStringList
-
Constructor Details
-
VelocityDataMemory
public VelocityDataMemory()
-
-
Method Details
-
getComponent
Retrieves a value as a KyoriComponentwith legacy color support.- Parameters:
key- the configuration key.replacements- optional placeholders to process before conversion.- Returns:
- a formatted Component, or
Component.empty()if not found.
-
getComponent
A specialized version of transform that directly returns a Component. * @param key the key pointing to the raw string.- Returns:
- processed Component.
-