Class RomanValueReader

  • All Implemented Interfaces:
    cn.org.bukkit.craneattribute.api.lifecycle.LifecycleAware , cn.org.bukkit.craneattribute.api.read.LineReader

    
    public class RomanValueReader
    extends ValueReader
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getName() 组件的逻辑名称(用于日志、调试、内部标识)。建议使用大写蛇形或驼峰命名,如 "MYTHIC_MOBS_SOURCE""LoreParserV2"
      String getConfigKey() 该组件在配置文件中的根键名(key)。例如,若 configKey = "mythic",则配置路径为 read.mythic.*。 此键将用于定位 getConfigSection 返回的 ConfigurationSection。
      Integer getPriority() 执行优先级。数值越小,越早执行。用于控制多个属性组件在同一事件中的调用顺序。 例如:伤害计算前加成(priority = 10)应在基础伤害计算(priority = 50)之前。
      Unit setPriority(Integer priority) 执行优先级。数值越小,越早执行。用于控制多个属性组件在同一事件中的调用顺序。 例如:伤害计算前加成(priority = 10)应在基础伤害计算(priority = 50)之前。
      List<ConfigSetting> getSettingConfig() 该组件所需的配置项声明列表。在注册时,ReadManager 会遍历此列表, 自动在配置文件中创建缺失的路径、写入默认值并添加注释。
      final List<String> getReadFormat()
      final Double getMultiplier()
      ReadValueResult read(ReadableLine readableLine, AttributeData data, AttributeSource attributeSource) 解析指定配置行并生成属性值结果。子类必须实现此方法,以定义具体的解析逻辑。
      • Methods inherited from class cn.org.bukkit.craneattribute.core.read.ValueReader

        extractValues, extractValues, getConfigSection, onDisable, onEnable
      • Methods inherited from class cn.org.bukkit.craneattribute.api.read.LineReader

        register
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RomanValueReader

        RomanValueReader()
    • Method Detail

      • getName

         String getName()

        组件的逻辑名称(用于日志、调试、内部标识)。

        建议使用大写蛇形或驼峰命名,如 "MYTHIC_MOBS_SOURCE""LoreParserV2"

      • getConfigKey

         String getConfigKey()

        该组件在配置文件中的根键名(key)。

        例如,若 configKey = "mythic",则配置路径为 read.mythic.*。 此键将用于定位 getConfigSection 返回的 ConfigurationSection。

      • getPriority

         Integer getPriority()

        执行优先级。

        数值越小,越早执行。用于控制多个属性组件在同一事件中的调用顺序。 例如:伤害计算前加成(priority = 10)应在基础伤害计算(priority = 50)之前。

      • setPriority

         Unit setPriority(Integer priority)

        执行优先级。

        数值越小,越早执行。用于控制多个属性组件在同一事件中的调用顺序。 例如:伤害计算前加成(priority = 10)应在基础伤害计算(priority = 50)之前。

      • getSettingConfig

         List<ConfigSetting> getSettingConfig()

        该组件所需的配置项声明列表。

        在注册时,ReadManager 会遍历此列表, 自动在配置文件中创建缺失的路径、写入默认值并添加注释。

      • read

         ReadValueResult read(ReadableLine readableLine, AttributeData data, AttributeSource attributeSource)

        解析指定配置行并生成属性值结果。

        子类必须实现此方法,以定义具体的解析逻辑。

        Parameters:
        readableLine - 待解析的原始配置行封装对象
        data - 当前上下文中的属性数据(使用静态属性源时为 null)
        attributeSource - 触发本次读取的属性源
        Returns:

        解析成功时返回 ReadValueResult,否则返回 null