1
mirror of https://github.com/CarmJos/UserPrefix.git synced 2026-06-04 15:28:21 +08:00

fix: 修复前缀内容显示错误的问题。

This commit is contained in:
2025-09-04 01:21:13 +08:00
parent 77a277ba58
commit 442374da0a
@@ -135,10 +135,20 @@ public class PrefixManager {
String name = conf.getString("name");
if (name == null) throw new Exception("配置文件 " + file.getAbsolutePath() + " 中没有配置前缀的显示名称。");
List<String> content = new ArrayList<>();
if (conf.isList("content")) {
content = conf.getStringList("content");
} else {
String single = conf.getString("content");
if (single != null) content.add(single);
}
return new PrefixConfig(
identifier, name,
conf.getStringList("description"),
conf.getStringList("content"),
content,
conf.getLong("period", -1L),
conf.getInt("weight", 1),
conf.getString("permission"),