类 JsonLocalizations
java.lang.Object
cn.afternode.commons.bukkit.JsonLocalizations
- 所有已实现的接口:
IAdventureLocalizations,cn.afternode.commons.localizations.ILocalizations
Minecraft style *.json language file
-
嵌套类概要
从接口继承的嵌套类/接口 cn.afternode.commons.bukkit.IAdventureLocalizations
IAdventureLocalizations.LocalizeMode -
构造器概要
构造器构造器说明JsonLocalizations(com.google.gson.JsonObject obj) Load from JsonObjectJsonLocalizations(ClassLoader loader, String path) Load from ClassLoader resources with raw pathJsonLocalizations(ClassLoader loader, String namespace, String langCode) Load from ClassLoader resources, at/assets/(namespace)/lang/(langCode).jsonJsonLocalizations(String path) Load from resources with raw pathJsonLocalizations(String namespace, String langCode) Load from resources -
方法概要
修饰符和类型方法说明static StringgetResourcePath(String namespace, String langCode) keys()net.kyori.adventure.text.TextComponentGet localizations without any placeholder and deserialize with legacy serializernet.kyori.adventure.text.TextComponentGet localizations with java formatter and deserialize with legacy serializernet.kyori.adventure.text.TextComponentGet localizations with specified placeholders and deserialize with legacy serializernet.kyori.adventure.text.ComponentGet localizations without any placeholder and deserialize with MiniMessagenet.kyori.adventure.text.ComponentGet localizations, format with Java formatter and deserialize with MiniMessagenet.kyori.adventure.text.ComponentGet localizations with specified placeholders and deserialize with MiniMessagewithFallback(cn.afternode.commons.localizations.ILocalizations fallback) voidwithLegacySerializer(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer serializer) Set current legacy serializervoidwithMiniMessage(net.kyori.adventure.text.minimessage.MiniMessage mm) Set current MiniMessage
-
构造器详细资料
-
JsonLocalizations
public JsonLocalizations(com.google.gson.JsonObject obj) Load from JsonObject- 参数:
obj- Json- 另请参阅:
-
Gson.fromJson(String, Class)
-
JsonLocalizations
Load from ClassLoader resources with raw path- 参数:
loader- Loaderpath- Raw resource path
-
JsonLocalizations
Load from resources with raw path- 参数:
path- Raw resource path
-
JsonLocalizations
Load from ClassLoader resources, at/assets/(namespace)/lang/(langCode).json- 参数:
loader- Loadernamespace- Namespace in pathlangCode- Language file name- 另请参阅:
-
JsonLocalizations
Load from resources- 参数:
namespace- Namespace in pathlangCode- Language file name- 另请参阅:
-
-
方法详细资料
-
get
- 指定者:
get在接口中cn.afternode.commons.localizations.ILocalizations
-
get
- 指定者:
get在接口中cn.afternode.commons.localizations.ILocalizations
-
get
- 指定者:
get在接口中cn.afternode.commons.localizations.ILocalizations
-
keys
- 指定者:
keys在接口中cn.afternode.commons.localizations.ILocalizations
-
getResourcePath
-
legacy
从接口复制的说明:IAdventureLocalizationsGet localizations without any placeholder and deserialize with legacy serializer- 指定者:
legacy在接口中IAdventureLocalizations- 参数:
key- Localization key- 返回:
- Result localization or provided key if not found
-
legacy
从接口复制的说明:IAdventureLocalizationsGet localizations with specified placeholders and deserialize with legacy serializer- 指定者:
legacy在接口中IAdventureLocalizations- 参数:
key- Localization keyplaceholders- Placeholders- 返回:
- Result localizations with placeholders applied, or provided key if not found
-
legacy
从接口复制的说明:IAdventureLocalizationsGet localizations with java formatter and deserialize with legacy serializer- 指定者:
legacy在接口中IAdventureLocalizations- 参数:
key- Localization keyargs- Formater replacements- 返回:
- Result localizations with String#format
- 另请参阅:
-
mini
从接口复制的说明:IAdventureLocalizationsGet localizations without any placeholder and deserialize with MiniMessage- 指定者:
mini在接口中IAdventureLocalizations- 参数:
key- Localization key- 返回:
- Result localization or provided key if not found
-
mini
从接口复制的说明:IAdventureLocalizationsGet localizations with specified placeholders and deserialize with MiniMessage- 指定者:
mini在接口中IAdventureLocalizations- 参数:
key- Localization keyplaceholders- Placeholders- 返回:
- Result localizations with placeholders applied, or provided key if not found
-
mini
从接口复制的说明:IAdventureLocalizationsGet localizations, format with Java formatter and deserialize with MiniMessage- 指定者:
mini在接口中IAdventureLocalizations- 参数:
key- Localization keyargs- Formater replacements- 返回:
- Result localizations with String#format
- 另请参阅:
-
withLegacySerializer
public void withLegacySerializer(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer serializer) 从接口复制的说明:IAdventureLocalizationsSet current legacy serializer- 指定者:
withLegacySerializer在接口中IAdventureLocalizations- 参数:
serializer- Serializer
-
withMiniMessage
public void withMiniMessage(net.kyori.adventure.text.minimessage.MiniMessage mm) 从接口复制的说明:IAdventureLocalizationsSet current MiniMessage- 指定者:
withMiniMessage在接口中IAdventureLocalizations- 参数:
mm- instance
-
withFallback
- 指定者:
withFallback在接口中cn.afternode.commons.localizations.ILocalizations
-