NeoForge 的 LuckPerms 聊天前缀
一个服务端 NeoForge 模组,用于在 Minecraft 1.21.1 的聊天消息中显示 LuckPerms 的前缀和后缀。
功能
- ?️ 在聊天中显示 LuckPerms 的前缀和后缀
- ? 支持 Minecraft 颜色代码(& 符号)
- ⚙️ 高度可配置的聊天格式
- ?️ 仅服务端安装——客户端无需安装
- ? 轻量且高效
要求
- Minecraft 1.21.1(仅限此版本)
- NeoForge 21.1.0 或更高版本
- 服务端已安装 LuckPerms 插件
- Java 21 或更高版本
安装
下载
从 GitHub Releases 下载最新版本。
服务端安装
- 从 releases page 下载最新的
lpchatprefix-1.21.1_1.1.0.jar
- 将 JAR 文件放入服务端的
mods 文件夹中
- 确保 LuckPerms 已安装并配置好
- 启动或重启服务器
客户端安装
不需要! 这是一个仅服务端的模组。玩家可以在不安装任何内容的情况下连接服务器。
配置
模组会在 config/lpchatprefix-common.toml 生成配置文件,包含以下选项:
[LPChatPrefix Config]
# 启用/禁用前缀显示
enablePrefix = true
# 启用/禁用后缀显示
enableSuffix = true
# 聊天消息格式模板
# 支持的占位符:{prefix}, {player}, {suffix}, {message}
messageFormat = "{prefix}{player}{suffix}: {message}"
# 消息文本颜色(Minecraft 颜色代码)
# 选项:black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple,
# gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, white
messageColor = "gray"
# 玩家名称颜色
nameColor = "white"
用法
- 在 LuckPerms 中设置前缀/后缀:
# 为某个组添加前缀
/lp group admin meta setprefix "&c[Admin] "
# 为用户添加后缀
/lp user <player> meta setsuffix " &7[VIP]"
- 前缀和后缀将自动出现在聊天消息中
输出示例
未使用该模组时:<PlayerName> Hello everyone!
使用该模组后:[Admin] PlayerName [VIP]: Hello everyone!
颜色代码支持
该模组支持使用 & 符号的 Minecraft 颜色代码:
&c - 红色
&a - 绿色
&b - 青色
&e - 黄色
&f - 白色
- 以及所有其他标准 Minecraft 颜色代码
故障排除
前缀/后缀未显示
- 确保 LuckPerms 已安装并在运行
- 检查玩家/组是否已设置前缀/后缀
- 验证模组是否已加载(检查服务器日志中的 “LPChatPrefix initialized”)
聊天中出现重复的玩家名称
- 确保使用的是最新版本
- 检查是否存在冲突的聊天格式化插件/模组
模组未加载
- 确认你恰好使用的是 Minecraft 1.21.1
- 确保 NeoForge 版本为 21.1.0 或更高
- 检查 Java 版本是否为 21 或更高
支持
如需反馈问题、提问或提供建议,请在 GitHub 仓库中提交 Issue。
致谢
- 专为 NeoForge 构建
- 需要由 Luck 开发的 LuckPerms
- 专为 Minecraft 1.21.1 开发
LuckPerms Chat Prefix for NeoForge
A server-side NeoForge mod that displays LuckPerms prefixes and suffixes in chat messages for Minecraft 1.21.1.
Features
- ?️ Display LuckPerms prefixes and suffixes in chat
- ? Support for Minecraft color codes (& symbols)
- ⚙️ Highly configurable message format
- ?️ Server-side only - clients don't need to install
- ? Lightweight and efficient
Requirements
- Minecraft 1.21.1 (strictly this version only)
- NeoForge 21.1.0 or higher
- LuckPerms plugin installed on server
- Java 21 or higher
Installation
Download
Download the latest version from GitHub Releases
Server Installation
- Download the latest
lpchatprefix-1.21.1_1.1.0.jar from releases page
- Place the JAR file in your server's
mods folder
- Ensure LuckPerms is installed and configured
- Start/restart your server
Client Installation
Not required! This is a server-side only mod. Players can connect without installing anything.
Configuration
The mod creates a configuration file at config/lpchatprefix-common.toml with the following options:
[LPChatPrefix Config]
# Enable/disable prefix display
enablePrefix = true
# Enable/disable suffix display
enableSuffix = true
# Chat message format template
# Supported placeholders: {prefix}, {player}, {suffix}, {message}
messageFormat = "{prefix}{player}{suffix}: {message}"
# Message text color (Minecraft color codes)
# Options: black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple,
# gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, white
messageColor = "gray"
# Player name color
nameColor = "white"
Usage
- Set up prefixes/suffixes in LuckPerms:
# Add a prefix to a group
/lp group admin meta setprefix "&c[Admin] "
# Add a suffix to a user
/lp user <player> meta setsuffix " &7[VIP]"
- The prefixes and suffixes will automatically appear in chat messages
Example Output
Without mod: <PlayerName> Hello everyone!
With mod: [Admin] PlayerName [VIP]: Hello everyone!
Color Code Support
The mod supports Minecraft color codes using the & symbol:
&c - Red
&a - Green
&b - Aqua
&e - Yellow
&f - White
- And all other standard Minecraft color codes
Troubleshooting
Prefixes/Suffixes not showing
- Ensure LuckPerms is installed and running
- Check that the player/group has prefixes/suffixes set
- Verify the mod is loaded (check server logs for "LPChatPrefix initialized")
Double player names in chat
- Make sure you're using the latest version
- Check for conflicting chat formatting plugins/mods
Mod not loading
- Verify you're using Minecraft 1.21.1 exactly
- Ensure NeoForge version is 21.1.0 or higher
- Check Java version is 21 or higher
Support
For issues, questions, or suggestions, please open an issue on the GitHub repository.
Credits
- Built for NeoForge
- Requires LuckPerms by Luck
- Developed for Minecraft 1.21.1
评论 0
登录后参与评分
还没有评论,来抢沙发吧