DSMPTitle
DSMPTitle 是一款用于 Paper 服务器的自定义标题管理插件。玩家可以购买并管理自己的自定义标题,而管理员可以为玩家授予、装备、移除和管理标题。
每个标题都独立存储其文本、颜色和优先级。标题前缀通过 LuckPerms PrefixNodes 进行存储,从而允许在聊天栏和玩家列表标签中显示标题。
功能
- 自定义标题购买系统
- 多种支付方式(经济货币、经验等级或物品)
- LuckPerms 前缀集成
- 持久化标题存储
- 带分页的标题管理 GUI
- 标题切换
- 管理员标题管理
- 专用的标题装备命令 (
/dt wear)
- 按名称或索引选择标题
- 可配置的标题颜色和前缀格式
- 多语言支持
- 可配置违禁词
- 可配置的标题长度和输入超时
- 基于组的标题
- 自动更新配置文件和语言文件
必需依赖
LuckPerms
必需
DSMPTitle 使用 LuckPerms 来存储和管理标题前缀。如果 LuckPerms API 不可用,该插件将自行禁用。
Vault
可选
仅在使用 economy 支付方式时才需要 Vault。
如果配置了物品或经验支付方式,则不需要 Vault。
经济插件
当使用 Vault 经济支付方式时,你还需要一个与 Vault 兼容的经济插件。
命令
玩家命令
| 命令 |
描述 |
/dt buy |
购买自定义标题 |
/dt cancel |
取消当前的标题创建过程 |
/dt gui |
打开你的标题库 |
/dt menu |
打开你的标题库 |
/dt clear |
清除你当前装备的标题 |
管理员命令
| 命令 |
描述 |
/dt gui <player> |
打开其他玩家的标题库 |
/dt menu <player> |
打开其他玩家的标题库 |
/dt clear <player> |
清除其他玩家当前装备的标题 |
/dt set <player> <title> <color> <weight> |
向玩家授予标题 |
/dt wear <player> <title|index> |
为玩家装备标题 |
/dt remove <player> <title|index> |
从玩家处移除标题 |
/dt reload |
重新加载所有插件配置 |
/dt reload data |
重新加载标题数据 |
/dt reload config |
重新加载主配置文件 |
/dt reload lang |
重新加载语言文件 |
/dt reload group |
重新加载组标题配置 |
权限
玩家权限
dsmptitle.buy - 购买自定义标题
dsmptitle.cancel - 取消当前的标题创建过程
dsmptitle.clear - 清除你当前装备的标题
dsmptitle.menu - 打开你的标题库
管理员权限
dsmptitle.clear.other - 清除其他玩家当前装备的标题
dsmptitle.menu.other - 打开其他玩家的标题库
dsmptitle.reload - 重新加载插件配置
dsmptitle.reload.data - 重新加载标题数据
dsmptitle.reload.config - 重新加载主配置文件
dsmptitle.reload.lang - 重新加载语言文件
dsmptitle.reload.group - 重新加载组标题配置
dsmptitle.remove - 从玩家处移除标题
dsmptitle.set - 向玩家授予标题
dsmptitle.wear - 为玩家装备标题
通配符权限
dsmptitle.* - 访问所有 DSMPTitle 权限
玩家权限默认对所有人开放,管理员权限默认仅对操作员开放。
标题名称与索引
/dt wear 和 /dt remove 接受标题文本或索引:
- 范围内有效的纯数字将被视为索引(从
0 开始)。
- 其他任何内容都将不区分大小写地与标题文本进行匹配。
- 如果玩家拥有两个或更多具有相同文本的标题,则该命令将被取消,必须改用索引。
示例:
/dt wear Alex 2 # 按索引装备
/dt wear Alex Builder # 按标题文本装备
/dt remove Alex Builder # 按标题文本移除
配置
主配置文件位于:
plugins/DSMPTitle/config.yml
重要选项包括:
price - 购买价格
use-item - 支付方式
prefix-weight - 购买标题的默认优先级
default-buy-title-color - 新购买标题的默认颜色
title-prefix-wrap - 放在标题前的文本
title-suffix-wrap - 放在标题后的文本
separator-color - 标题后应用的颜色
enable-chat-format - 是否由 DSMPTitle 格式化聊天消息
default-chat - 使用 %title% 的聊天格式
min-char - 最小标题长度
max-char - 最大标题长度
wait-seconds - 输入标题允许的最大时间
language - 要使用的语言文件
gui - 标题 GUI 设置
banned-words - 标题创建的禁止词汇
config-version - 配置文件版本(请勿手动编辑)
YAML 缩进必须使用空格。请勿使用制表符。
配置更新
config.yml 和语言文件在文件末尾带有版本标记(config-version 和 language-version)。
在启动时以及执行 /dt reload 时,DSMPTitle 会将现有文件中找到的版本与插件捆绑的版本进行比较:
- 旧文件 — 缺失的键(及其注释)会被添加,版本标记会更新,且所有现有值均保持不变。例如,如果旧文件中包含
language: en_US,更新后它仍然是 en_US。
- 相同版本 — 不进行任何写入操作。
- 新版本文件 — 记录警告日志,文件保持原样不动。
现有的键、自定义值和注释均会被保留。若要强制重新生成干净的文件,请删除该文件并重启服务器。
支付方式
DSMPTitle 通过 use-item 支持多种支付方式。
经济系统
price: 60000
use-item: "economy"
配置的经济金额将通过 Vault 扣除。
使用此方法需要安装 Vault 以及一个兼容 Vault 的经济插件。
经验值
price: 10
use-item: "xp"
玩家必须至少拥有 10 级经验才能购买称号。
配置的 price 表示要扣除的经验等级数量。
不需要 Vault。
物品
price: 32
use-item: "acacia_log"
玩家必须拥有 32 个 acacia_log 物品才能购买称号。
配置的 price 表示要消耗的物品数量。
不需要 Vault。
语言文件
语言文件存储在以下路径:
plugins/DSMPTitle/lang/
可用的语言文件包括:
通过以下方式选择语言:
language: zh_CN
货币名称可以在语言文件中配置:
currency-name: "金币"
英文:
currency-name: "coin"
插件消息可以使用 %prefix%、%currency% 和其他支持的占位符。
示例:
success: "%prefix%&a自定义称号购买成功, 已自动装备新称号"
每个语言文件的末尾还有一个 language-version 标记,用于上述自动更新过程。
颜色格式
DSMPTitle 支持 Minecraft 传统的 & 颜色代码。
示例:
&aGreen
&6Gold
&x&F&F&0&0&0&0Custom Color
在标题配置支持的情况下,标题颜色也可以使用 MiniMessage 格式。
示例:
<rainbow>
称号 GUI
称号存储 GUI 允许玩家:
- 查看已购买的称号
- 切换拥有的称号
- 查看称号信息
- 查看购买时间
- 在页面之间导航
- 在未拥有任何称号时显示空称号占位符
管理员可以通过相应的管理权限打开其他玩家的名誉存储界面。
组称号
组称号配置在以下文件中:
plugins/DSMPTitle/group.yml
一个组可以定义一个称号、颜色和优先级。
示例:
default:
title: 萌新
color: '&7'
weight: 1
如果某个组没有配置称号,则该组不会应用任何组称号。
称号数据
玩家称号数据持久化存储在以下文件中:
plugins/DSMPTitle/data.yml
数据包含玩家称号、颜色、优先级、购买时间和当前激活的称号信息。
示例:
UUID: PlayerUuid
name: PlayerName
titles:
- title: "Title text1"
color: "&6"
weight: 610
time: timestamp
- title: "Title text2"
color: "<rainbow>"
weight: 670
time: timestamp
active-index: 0
如果您手动编辑数据文件,请使用:
/dt reload data
来重载称号数据。
创建称号
在购买称号时,玩家必须在配置的时间限制内在聊天中输入称号。
最小和最大称号长度由以下配置控制:
min-char: 2
max-char: 9
当称号包含配置的违禁词或禁止字符时,也可以拒绝创建。
注意事项
- DSMPTitle 运行需要 LuckPerms。
- 仅在使用
economy 支付方式时需要 Vault。
- 经验值和物品支付方式不需要 Vault。
- 称号索引从
0 开始,并与 data.yml 中的 active-index 字段匹配。
- 称号数据持久化存储在
data.yml 中。
- 已购买的称号使用配置的购买价格和默认称号颜色。
- 每个称号都有各自的文本、颜色和优先级。
- 管理称号功能由相应的权限节点控制。
- 配置文件和语言文件会自动升级,并保留您的现有值。
源代码
DSMPTitle 的源代码已在 GitHub 上发布,仅供参考。
?
许可证
Copyright (C) 2025 dydaozhu
DSMPTitle 是自由软件:您可以根据自由软件基金会发布的 GNU Affero 通用公共许可证 v3.0 条款对其进行重新分发和/或修改。
DSMPTitle 的分发希望它能有用,但不提供任何担保;甚至不包括适销性或特定用途适用性的隐含担保。有关更多详细信息,请参阅 GNU Affero 通用公共许可证。
由于 DSMPTitle 受 AGPL 许可,如果您在公开可访问的服务器上运行此插件的修改版本,则必须向该服务器的用户提供相应的源代码。
完整许可证文本:
DSMPTitle
DSMPTitle is a custom title management plugin for Paper servers. Players can purchase and manage their own custom titles, while administrators can grant, equip, remove and manage titles for players.
Each title stores its text, color and priority independently. Title prefixes are stored through LuckPerms PrefixNodes, allowing titles to be displayed in chat and the player tab list.
Features
- Custom title purchasing system
- Multiple payment methods (economy, experience levels or items)
- LuckPerms prefix integration
- Persistent title storage
- Title management GUI with pagination
- Title switching
- Administrative title management
- Dedicated title equip command (
/dt wear)
- Title selection by name or by index
- Configurable title colors and prefix formatting
- Multi-language support
- Configurable banned words
- Configurable title length and input timeout
- Group-based titles
- Automatic configuration and language file updates
Required Dependencies
LuckPerms
Required
DSMPTitle uses LuckPerms to store and manage title prefixes. The plugin will disable itself if the LuckPerms API is not available.
Vault
Optional
Vault is only required when using the economy payment method.
If an item or experience payment method is configured, Vault is not required.
Economy Plugin
When using the Vault economy payment method, you also need an economy plugin compatible with Vault.
Commands
Player Commands
| Command |
Description |
/dt buy |
Purchase a custom title |
/dt cancel |
Cancel the current title creation process |
/dt gui |
Open your title storage |
/dt menu |
Open your title storage |
/dt clear |
Clear your equipped title |
Administrative Commands
| Command |
Description |
/dt gui <player> |
Open another player's title storage |
/dt menu <player> |
Open another player's title storage |
/dt clear <player> |
Clear another player's equipped title |
/dt set <player> <title> <color> <weight> |
Grant a title to a player |
/dt wear <player> <title|index> |
Equip a title for a player |
/dt remove <player> <title|index> |
Remove a title from a player |
/dt reload |
Reload all plugin configuration |
/dt reload data |
Reload title data |
/dt reload config |
Reload the main configuration |
/dt reload lang |
Reload language files |
/dt reload group |
Reload group title configuration |
Permissions
Player Permissions
dsmptitle.buy - Purchase custom titles
dsmptitle.cancel - Cancel the current title creation process
dsmptitle.clear - Clear your equipped title
dsmptitle.menu - Open your title storage
Administrative Permissions
dsmptitle.clear.other - Clear another player's equipped title
dsmptitle.menu.other - Open another player's title storage
dsmptitle.reload - Reload plugin configuration
dsmptitle.reload.data - Reload title data
dsmptitle.reload.config - Reload the main configuration
dsmptitle.reload.lang - Reload language files
dsmptitle.reload.group - Reload group title configuration
dsmptitle.remove - Remove titles from players
dsmptitle.set - Grant titles to players
dsmptitle.wear - Equip titles for players
Wildcard Permission
dsmptitle.* - Access all DSMPTitle permissions
Player permissions default to everyone, administrative permissions default to operators.
Title Names and Indexes
/dt wear and /dt remove accept either a title text or an index:
- A plain number that is within range is treated as an index (starting at
0).
- Anything else is matched against the title text, case-insensitively.
- If the player owns two or more titles with the same text, the command is cancelled and an index must be used instead.
Examples:
/dt wear Alex 2 # equip by index
/dt wear Alex Builder # equip by title text
/dt remove Alex Builder # remove by title text
Configuration
The main configuration file is:
plugins/DSMPTitle/config.yml
Important options include:
price - Purchase price
use-item - Payment method
prefix-weight - Default priority for purchased titles
default-buy-title-color - Default color for newly purchased titles
title-prefix-wrap - Text placed before a title
title-suffix-wrap - Text placed after a title
separator-color - Color applied after the title
enable-chat-format - Whether DSMPTitle formats chat messages
default-chat - Chat format using %title%
min-char - Minimum title length
max-char - Maximum title length
wait-seconds - Maximum time allowed for entering a title
language - Language file to use
gui - Title GUI settings
banned-words - Forbidden words for title creation
config-version - Configuration file version (do not edit manually)
YAML indentation must use spaces. Do not use tab characters.
Configuration Updates
config.yml and the language files carry a version marker at the end of the file (config-version and language-version).
On startup, and on /dt reload, DSMPTitle compares the version found in the existing file with the version bundled in the plugin:
- Older file — missing keys (with their comments) are added, the version marker is updated, and every existing value is kept. For example, if the old file contains
language: en_US, it is still en_US after the update.
- Same version — nothing is written.
- Newer file — a warning is logged and the file is left untouched.
Existing keys, custom values and comments are preserved. To force a clean regeneration instead, delete the file and restart the server.
Payment Methods
DSMPTitle supports multiple payment methods through use-item.
Economy
price: 60000
use-item: "economy"
The configured economy amount is deducted through Vault.
Vault and a Vault-compatible economy plugin are required for this method.
Experience
price: 10
use-item: "xp"
The player must have at least 10 experience levels to purchase the title.
The configured price represents the number of experience levels to deduct.
Vault is not required.
Item
price: 32
use-item: "acacia_log"
The player must have 32 acacia_log items to purchase the title.
The configured price represents the number of items to consume.
Vault is not required.
Language Files
Language files are stored in:
plugins/DSMPTitle/lang/
Available language files include:
The language is selected through:
language: zh_CN
The currency name can be configured in the language file:
currency-name: "金币"
English:
currency-name: "coin"
Plugin messages can use %prefix%, %currency% and other supported placeholders.
Example:
success: "%prefix%&a自定义称号购买成功, 已自动装备新称号"
Each language file also ends with a language-version marker used by the automatic update process described above.
Color Format
DSMPTitle supports Minecraft legacy & color codes.
Examples:
&aGreen
&6Gold
&x&F&F&0&0&0&0Custom Color
Title colors can also use MiniMessage formatting where supported by the title configuration.
Example:
<rainbow>
Title GUI
The title storage GUI allows players to:
- View purchased titles
- Switch between owned titles
- View title information
- View purchase time
- Navigate between pages
- See an empty-title placeholder when no titles are owned
Administrators can open another player's title storage through the corresponding administrative permission.
Group Titles
Group titles are configured in:
plugins/DSMPTitle/group.yml
A group can define a title, color and priority.
Example:
default:
title: 萌新
color: '&7'
weight: 1
If a group does not have a configured title, no group title is applied for that group.
Title Data
Player title data is stored persistently in:
plugins/DSMPTitle/data.yml
The data contains player titles, colors, priorities, purchase times and active title information.
Example:
UUID: PlayerUuid
name: PlayerName
titles:
- title: "Title text1"
color: "&6"
weight: 610
time: timestamp
- title: "Title text2"
color: "<rainbow>"
weight: 670
time: timestamp
active-index: 0
If you manually edit the data file, use:
/dt reload data
to reload the title data.
Title Creation
When purchasing a title, the player must enter the title in chat within the configured time limit.
The minimum and maximum title length are controlled by:
min-char: 2
max-char: 9
Titles can also be rejected when they contain configured banned words or forbidden characters.
Notes
- LuckPerms is required for DSMPTitle to operate.
- Vault is only required for the
economy payment method.
- Experience and item payment methods do not require Vault.
- Title indexes start at
0 and match the active-index field in data.yml.
- Title data is stored persistently in
data.yml.
- Purchased titles use the configured purchase price and default title color.
- Each title has its own text, color and priority.
- Administrative title management is controlled by the corresponding permission nodes.
- Configuration and language files are upgraded automatically and keep your existing values.
Source Code
The source code of DSMPTitle is published on GitHub for reference only.
?
License
Copyright (C) 2025 dydaozhu
DSMPTitle is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License v3.0 as published by the Free Software Foundation.
DSMPTitle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
Because DSMPTitle is licensed under the AGPL, if you run a modified version of this plugin on a publicly accessible server, you must offer the corresponding source code to the users of that server.
Full license text:
评论 0
登录后参与评分
还没有评论,来抢沙发吧