接口 IAdventureLocalizations

所有超级接口:
cn.afternode.commons.localizations.ILocalizations
所有已知实现类:
ConfigurationLocalizations, JsonLocalizations

public interface IAdventureLocalizations extends cn.afternode.commons.localizations.ILocalizations
  • 嵌套类概要

    嵌套类
    修饰符和类型
    接口
    说明
    static enum 
     
  • 方法概要

    修饰符和类型
    方法
    说明
    net.kyori.adventure.text.TextComponent
    Get localizations without any placeholder and deserialize with legacy serializer
    net.kyori.adventure.text.TextComponent
    legacy(String key, String... args)
    Get localizations with java formatter and deserialize with legacy serializer
    net.kyori.adventure.text.TextComponent
    legacy(String key, Map<String,Object> placeholders)
    Get localizations with specified placeholders and deserialize with legacy serializer
    net.kyori.adventure.text.Component
    mini(String key)
    Get localizations without any placeholder and deserialize with MiniMessage
    net.kyori.adventure.text.Component
    mini(String key, String... args)
    Get localizations, format with Java formatter and deserialize with MiniMessage
    net.kyori.adventure.text.Component
    mini(String key, Map<String,Object> placeholders)
    Get localizations with specified placeholders and deserialize with MiniMessage
    void
    withLegacySerializer(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer serializer)
    Set current legacy serializer
    void
    withMiniMessage(net.kyori.adventure.text.minimessage.MiniMessage mm)
    Set current MiniMessage

    从接口继承的方法 cn.afternode.commons.localizations.ILocalizations

    get, get, get, keys, withFallback
  • 方法详细资料

    • legacy

      net.kyori.adventure.text.TextComponent legacy(String key)
      Get localizations without any placeholder and deserialize with legacy serializer
      参数:
      key - Localization key
      返回:
      Result localization or provided key if not found
    • legacy

      net.kyori.adventure.text.TextComponent legacy(String key, Map<String,Object> placeholders)
      Get localizations with specified placeholders and deserialize with legacy serializer
      参数:
      key - Localization key
      placeholders - Placeholders
      返回:
      Result localizations with placeholders applied, or provided key if not found
    • legacy

      net.kyori.adventure.text.TextComponent legacy(String key, String... args)
      Get localizations with java formatter and deserialize with legacy serializer
      参数:
      key - Localization key
      args - Formater replacements
      返回:
      Result localizations with String#format
      另请参阅:
    • mini

      net.kyori.adventure.text.Component mini(String key)
      Get localizations without any placeholder and deserialize with MiniMessage
      参数:
      key - Localization key
      返回:
      Result localization or provided key if not found
    • mini

      net.kyori.adventure.text.Component mini(String key, Map<String,Object> placeholders)
      Get localizations with specified placeholders and deserialize with MiniMessage
      参数:
      key - Localization key
      placeholders - Placeholders
      返回:
      Result localizations with placeholders applied, or provided key if not found
    • mini

      net.kyori.adventure.text.Component mini(String key, String... args)
      Get localizations, format with Java formatter and deserialize with MiniMessage
      参数:
      key - Localization key
      args - Formater replacements
      返回:
      Result localizations with String#format
      另请参阅:
    • withLegacySerializer

      void withLegacySerializer(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer serializer)
      Set current legacy serializer
      参数:
      serializer - Serializer
    • withMiniMessage

      void withMiniMessage(net.kyori.adventure.text.minimessage.MiniMessage mm)
      Set current MiniMessage
      参数:
      mm - instance