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>

public class VelocityDataMemory extends GenericMapDataMemory<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
  • Constructor Details

    • VelocityDataMemory

      public VelocityDataMemory()
  • Method Details

    • getComponent

      public net.kyori.adventure.text.Component getComponent(String key, Replacement... replacements)
      Retrieves a value as a Kyori Component with 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

      public net.kyori.adventure.text.Component getComponent(String key)
      A specialized version of transform that directly returns a Component. * @param key the key pointing to the raw string.
      Returns:
      processed Component.