9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 09:59:15 +00:00

Update Configurable unknown command message patch to follow the vanilla

* Add <message> to be more configurable
* Fix for custom brigadier exception message #319
This commit is contained in:
Dreeam
2025-05-13 05:20:20 -04:00
parent 189ac58976
commit e01facb2a3
16 changed files with 68 additions and 58 deletions

View File

@@ -9,15 +9,19 @@ public class UnknownCommandMessage extends ConfigModules {
return EnumConfigCategory.MISC.getBaseKeyName() + ".message";
}
public static String unknownCommandMessage = "<red><lang:command.unknown.command><newline><detail>";
public static String unknownCommandMessage = "default";
@Override
public void onLoaded() {
unknownCommandMessage = config.getString(getBasePath() + ".unknown-command", unknownCommandMessage, config.pickStringRegionBased("""
Unknown command message, using MiniMessage format, set to "default" to use vanilla message,
placeholder: <detail>, shows detail of the unknown command information.""",
placeholder:
<message>, show message of the command exception.
<detail>, shows detail of the command exception.""",
"""
发送未知命令时的消息, 使用 MiniMessage 格式, 设置为 "default" 使用原版消息.
变量: <detail>, 显示未知命令详细信息."""));
变量:
<message>, 显示命令错误所附提示消息.
<detail>, 显示命令错误详细信息."""));
}
}