mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-25 01:49:30 +00:00
添加多行支持
This commit is contained in:
@@ -368,7 +368,13 @@ public abstract class AbstractFontManager implements FontManager {
|
||||
if (keywords.isEmpty()) {
|
||||
throw new LocalizedResourceConfigException("warning.config.emoji.missing_keywords", path, id);
|
||||
}
|
||||
String content = section.getOrDefault("content", "<arg:emoji>").toString();
|
||||
Object rawContent = section.getOrDefault("content", "<white><arg:emoji></white>");
|
||||
String content;
|
||||
if (rawContent instanceof List<?> list) {
|
||||
content = list.stream().map(Object::toString).collect(Collectors.joining());
|
||||
} else {
|
||||
content = rawContent.toString();
|
||||
}
|
||||
String image = null;
|
||||
if (section.containsKey("image")) {
|
||||
String rawImage = section.get("image").toString();
|
||||
|
||||
Reference in New Issue
Block a user