Class CustomSection

  • All Implemented Interfaces:

    
    public final class CustomSection
    extends SectionParser
                        

    自定义节点, 具体将在js文件中实现, nashorn会自动解析匹配类型, 因此不用担心重定向问题, 不用将kotlin的function更改为java的function 别问我这个类为什么不叫CustomParser, 等我反应过来的时候为时已晚

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final String id
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getId() 获取节点解析器ID
      String onRequest(ConfigurationSection data, Map<String, String> cache, OfflinePlayer player, ConfigurationSection sections) 用于私有节点解析
      String onRequest(List<String> args, Map<String, String> cache, OfflinePlayer player, ConfigurationSection sections) 用于即时节点解析
      • Methods inherited from class pers.neige.neigeitems.section.SectionParser

        register
      • Methods inherited from class java.lang.Object

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

      • onRequest

         String onRequest(ConfigurationSection data, Map<String, String> cache, OfflinePlayer player, ConfigurationSection sections)

        用于私有节点解析

        Parameters:
        data - 节点内容
        cache - 解析值缓存
        player - 待解析玩家
        sections - 节点池
        Returns:

        解析值

      • onRequest

         String onRequest(List<String> args, Map<String, String> cache, OfflinePlayer player, ConfigurationSection sections)

        用于即时节点解析

        Parameters:
        args - 节点参数
        cache - 解析值缓存
        player - 待解析玩家
        sections - 节点池
        Returns:

        解析值