|
SimpleNicks
一个独立的昵称插件,让你无需安装包含大量其他功能的臃肿插件。
只需要昵称功能?选择 SimpleNicks!
|
特性
使用 MiniMessage 设置昵称
在昵称中使用 MiniMessage 格式。
|
|
允许在标签页列表中显示昵称
在标签页列表(Tab List)中显示玩家昵称。
|
|
保存昵称
可以保存昵称以便日后使用,例如用于角色扮演。
|
|
昵称保护
防止因复制用户名或昵称造成的混淆。
|
|
“那是谁?”
找出玩家的真实身份。
|
|
更多功能
- 支持权限系统,可使用 LuckPerms 等插件。
- 基于 SQL 的存储,可选择 MySQL(服务器端)或 SQLite(本地,默认)。
- 控制特定昵称功能是否需要权限。
- 控制用户名或昵称的保护时长。
- 昵称前缀功能,让你知道谁隐藏了身份。
- PlaceholderAPI 扩展,让你可以在需要的地方插入昵称。
命令
玩家命令
| 命令 |
描述 |
/nick help |
显示帮助文本。 |
/nick set <nickname> |
设置你的昵称。 支持 MiniMessage 格式。 |
/nick save [nickname] |
保存当前昵称以便日后使用。 你也可以直接提供一个要保存的昵称。 |
/nick delete <nickname> |
删除你已保存的一个昵称。 |
/nick reset |
将昵称重置为你的原始用户名。 |
/nick who <nickname> |
显示拥有所提供昵称的玩家的用户名。 |
管理员命令
| 命令 |
描述 |
/nick admin set <username> <nickname> |
设置其他玩家的昵称。 使用管理员的权限进行格式化。 |
/nick admin reset <username> |
重置其他玩家的昵称。 |
/nick admin delete <username> <nickname> |
从玩家的列表中删除一个已保存的昵称。 |
/nick admin lookup <username> |
显示玩家当前的昵称以及所有已保存的昵称。 |
/nick reload |
重新加载配置文件和本地化文件。 |
权限
玩家权限
| 权限 |
描述 |
默认值 |
simplenick.nick.set |
设置自己的昵称。 |
op |
simplenick.nick.reset |
重置自己的昵称。 |
op |
simplenick.nick.delete |
删除自己已保存的一个昵称。 |
op |
simplenick.nick.who |
使用 /nick who <nickname> 查询用户名。 |
true |
颜色权限
| 权限 |
描述 |
默认值 |
simplenick.color.basic |
使用颜色标签 (<red>, <color:#aabbcc>)。 |
op |
simplenick.color.gradient |
使用渐变标签 (<gradient:red:blue>)。 |
op |
simplenick.color.rainbow |
使用 <rainbow>。 |
op |
simplenick.color.reset |
使用 <reset>。 |
op |
格式权限
| 权限 |
描述 |
默认值 |
simplenick.format.bold |
使用 <b>/</b>。 |
op |
simplenick.format.italic |
使用 <i>/</i>。 |
op |
simplenick.format.underline |
使用 <u>/</u>。 |
op |
simplenick.format.strikethrough |
使用 <st>/</st>。 |
op |
simplenick.format.obfuscated |
使用 <obf>/</obf>。 |
op |
管理员权限
| 权限 |
描述 |
默认值 |
simplenick.admin.set |
设置其他玩家的昵称。 |
op |
simplenick.admin.reset |
重置其他玩家的昵称。 |
op |
simplenick.admin.delete |
删除其他玩家已保存的昵称。 |
op |
simplenick.admin.lookup |
查询玩家当前及已保存的昵称。 |
op |
simplenick.reload |
重新加载插件配置与本地化文件。 |
op |
绕过权限
| 权限 |
描述 |
默认值 |
simplenick.bypass.username |
使用其他玩家的用户名作为昵称。 |
false |
simplenick.bypass.length |
设置超过配置最大长度的昵称。 |
false |
simplenick.bypass.regex |
设置不符合配置正则表达式的昵称。 |
false |
simplenick.bypass.nick-protection |
绕过昵称保护(在线/离线/过期)。 |
false |
PlaceholderAPI
所有占位符现在均以 simplenick 开头,以保持一致性。
| 占位符 |
描述 |
示例 |
%simplenick_nickname% |
玩家解析后的昵称。 |
 |
%simplenick_mininick% |
玩家的原始 MiniMessage 格式昵称。 |
 |
%simplenick_prefixed-nickname% |
应用了配置前缀的昵称。 |
 |
%simplenick_prefixed-mininick% |
带有前缀的原始 MiniMessage 格式昵称。 |
 |
配置
MySQL
插件默认使用本地 .db SQLite 数据库。这无需额外设置,但无法在服务器网络中共享。
如果您希望使用 MySQL,可以通过启用它并在配置中填写相关信息来实现。
mysql:
enabled: false
ip: "localhost:3306"
name: simplenicks
username: username1
password: badpassword!
昵称长度
这是玩家在颜色与格式处理完成后的昵称最大长度。
例如,如果你设置了一个类似这样的昵称:
<blue>ThisIs</blue><green>AConvoluted</green><rainbow>Exam</rainbow><b>ple</b>
实际会被检查的文本将是 ThisIsAConvolutedExample。
⚠️ ℹ️
不建议将数值设置为低于 3,因为这可能会导致意外的副作用。
# 昵称的最大字符数,不包括格式标记
# (因此像 <red>Billy<yellow>Bob 这样的名字只计算 'BillyBob' - 共 8 个字符)
# 将此数字设置为低于 "3" 的值可能会导致意外的副作用
max-nickname-length: 30
昵称正则表达式
这是昵称中允许的字符集。默认值仅允许字母、数字和下划线 [A-Za-z0-9_]+ - 你可以在此添加其他字符,建议使用 等工具确保你的正则表达式能正确解析。
⚠️ ℹ️
使用非字母数字字符通常不受支持,并可能导致意外的副作用。
# 有效最终昵称字符的正则表达式。
# 请注意,放入非字母数字字符可能会导致与其他插件的问题以及其他意外的副作用
nickname-regex: "[A-Za-z0-9_]+"
需要权限
这些选项用于设置特定功能是否需要权限。如果你不了解权限插件是什么,并且只想让插件正常工作,可以将你希望的功能设置为 'false'。如果你了解权限的概念及其使用方法,可能不需要此部分。
Nick(昵称)
提供以下功能:
/nick set
/nick reset
/nick save
允许玩家更改其显示名称。
Color(颜色)
提供颜色标签的功能,如 <red>、<#aabbcc>、<rainbow>、<gradient:color1:color2> 和 <reset>。
允许玩家更改其显示名称及其名称的颜色。
Format(格式)
提供格式标签的功能,如 <u>(下划线)、<i>(斜体)、<b>(粗体)、<st>(删除线)和 <obf>(ō̵̬b̵̧̛f̷̩̋u̵̳͂ş̸̓c̷̥̈́a̵͇͂t̸̯͋e̸͎̚d̷̟͝)。
Who(谁)
提供访问 /nick who <name> 的权限,该命令显示与特定昵称关联的用户名。
# 哪些功能需要由权限插件设置的权限?
require-permission:
nick: true
color: true
format: true
who: false
昵称保护
允许保护已被使用的昵称。这不保护已保存的昵称,也不阻止他人保存昵称。
在线保护
仅防止玩家占用当前在线玩家的昵称。允许人们使用离线玩家的昵称。
离线保护
无论玩家是否在线,只要昵称未过期,都防止玩家使用其他人正在主动使用的昵称。
离线保护过期时间
玩家需要离开多少天后,其昵称保护才会过期。如果不想让昵称保护过期,请设置为 -1,但不建议这样做。
用户名保护
防止玩家将自己的昵称设置为其他玩家的用户名。仅针对实际登录过服务器的玩家进行检查。
用户名保护过期时间
此值控制玩家需要离线多少天后,其用户名才被视为允许被用作昵称。如果您不希望保护永久有效,请使用 -1。
# 阻止某些名称被用作昵称
# 过期时间以天为单位,设置为 -1 表示永不失效
nickname-protection:
username:
enabled: true
expires: 30
online:
enabled: false
offline:
enabled: false
expires: 30
最大保存数量
控制玩家可以保存多少个昵称。目前对此没有覆盖权限,该设置适用于所有拥有保存权限的玩家。
# 可以保存多少个昵称?
max-saves: 5
标签页列表昵称
修改标签页列表(Tablist)以显示玩家的当前昵称。如果您已经有其他插件可以处理此功能,建议您使用那些插件,或者使用我的另一个插件 Simple Custom Tab List,因为此选项非常有限且容易与其他插件产生冲突。如果您的服务器配置非常简单,只是希望昵称显示在标签页列表中,这将起作用;但如果您使用了 Geyser 或其他可能会更改记分板和其他随机内容的插件,您还是需要单独使用一个插件来处理标签页列表。
# 是否应在标签页列表中更改名称?
# (如果您使用任何其他标签页列表插件,请保持此项为 false,这些插件中有对应的占位符 API 占位符可用)
tablist-nick: false
昵称前缀
设置昵称的前缀。
用于玩家显示名称以及占位符 %simplenick_prefixed-nickname% 和 %simplenick_prefixed-mininick%。
# 拥有昵称的玩家应添加什么前缀?如果不需要前缀,请输入 ""
nickname-prefix: ""
调试模式
为此插件启用开发调试日志记录。
⚠️ ℹ️
这将导致您的日志大量刷屏,并使其几乎无法阅读。
除非被告知,否则请勿启用。
# 开发选项,这将导致日志大量刷屏,除非被要求,否则不建议启用
debug-mode: false
从旧版本迁移
如果您是从 不支持 SQL 的 SimpleNicks 版本进行升级:
- 数据存储:
- 旧版本将昵称存储在 YML 文件或通过持久化数据容器(PDC)中。
- 新版本使用 MySQL 或 SQLite。现有数据将自动迁移。
- 命令:
- 管理员命令现在位于
/nick admin 下,而不是共享玩家命令结构。
/nick save 现在可以接受参数(/nick save <nickname>)。
- 权限:
- 颜色和格式权限已移至其独立节点(
simplenick.color.* 和 simplenick.format.*)。
- 颜色和格式现在可以在没有特定权限的情况下被允许,请查看新的配置选项。
simplenick.admin.restrictive、simplenick.admin.basic 和 simplenick.admin.full 已被移除。现在的权限是 simplenick.admin.set。
- 管理员设置昵称现在始终使用管理员自身的权限。(以前是 'admin basic' 的功能)
simplenick.admin.save 已被移除——由于现在使用的是 Brigadier,您可以使用
- PlaceholderAPI:
|
SimpleNicks
A standalone nickname plugin so you don't need to get a plugin with tons of other stuff.
Just want nicknames? Go with SimpleNicks!
|
Features
Set Nicknames With MiniMessage
Use MiniMessage formatting in nicknames.
|
|
Allow Nicknames in Tab List
Display player nicknames in the tab list.
|
|
Save Nicknames
Nicknames can be saved for future use, like in roleplaying.
|
|
Nickname Protection
Prevent confusion with username / nickname copying.
|
|
"Who Is That?"
Find out a player's secret identity.
|
|
And More
- Permissions support, use something like LuckPerms.
- SQL-based storage, choose between MySQL (Server) or SQLite (Local, default).
- No, you do not need any SQL setup to run this plugin.
- Control whether specific nickname functionality requires permissions.
- Control how long a username or nickname is protected for.
- Nickname prefixing, so you know who is hiding their identity.
- PlaceholderAPI expansion, so you can put the nicknames wherever you need to.
Commands
Player Commands
| Command |
Description |
/nick help |
Displays help text. |
/nick set <nickname> |
Sets your nickname. Supports MiniMessage formatting. |
/nick save [nickname] |
Saves your current nickname for later use. You can also provide a nickname to save directly. |
/nick delete <nickname> |
Deletes one of your saved nicknames. |
/nick reset |
Resets your nickname to your original username. |
/nick who <nickname> |
Displays the username of the player with the supplied nickname. |
Admin Commands
| Command |
Description |
/nick admin set <username> <nickname> |
Sets another player’s nickname. Uses the admin’s permissions for formatting. |
/nick admin reset <username> |
Resets another player’s nickname. |
/nick admin delete <username> <nickname> |
Deletes a saved nickname from a player’s list. |
/nick admin lookup <username> |
Displays a player’s current nickname and all saved nicknames. |
/nick reload |
Reloads the configuration and locale. |
Permissions
Player Permissions
| Permission |
Description |
Default |
simplenick.nick.set |
Set your own nickname. |
op |
simplenick.nick.reset |
Reset your own nickname. |
op |
simplenick.nick.delete |
Delete one of your saved nicknames. |
op |
simplenick.nick.who |
Use /nick who <nickname> to look up usernames. |
true |
Color Permissions
| Permission |
Description |
Default |
simplenick.color.basic |
Use color tags (<red>, <color:#aabbcc>). |
op |
simplenick.color.gradient |
Use gradient tags (<gradient:red:blue>). |
op |
simplenick.color.rainbow |
Use <rainbow>. |
op |
simplenick.color.reset |
Use <reset>. |
op |
Format Permissions
| Permission |
Description |
Default |
simplenick.format.bold |
Use <b>/</b>. |
op |
simplenick.format.italic |
Use <i>/</i>. |
op |
simplenick.format.underline |
Use <u>/</u>. |
op |
simplenick.format.strikethrough |
Use <st>/</st>. |
op |
simplenick.format.obfuscated |
Use <obf>/</obf>. |
op |
Admin Permissions
| Permission |
Description |
Default |
simplenick.admin.set |
Set another player’s nickname. |
op |
simplenick.admin.reset |
Reset another player’s nickname. |
op |
simplenick.admin.delete |
Delete a saved nickname from another player. |
op |
simplenick.admin.lookup |
Lookup a player’s current and saved nicknames. |
op |
simplenick.reload |
Reload plugin configuration and locale. |
op |
Bypass Permissions
| Permission |
Description |
Default |
simplenick.bypass.username |
Use another player’s username as a nickname. |
false |
simplenick.bypass.length |
Set nicknames longer than the configured max length. |
false |
simplenick.bypass.regex |
Set nicknames that don’t match the configured regex. |
false |
simplenick.bypass.nick-protection |
Bypass nickname protection (online/offline/expires). |
false |
PlaceholderAPI
All placeholders now start with simplenick for consistency.
| Placeholder |
Description |
Example |
%simplenick_nickname% |
Player’s parsed nickname. |
 |
%simplenick_mininick% |
Player’s raw MiniMessage nickname. |
 |
%simplenick_prefixed-nickname% |
Nickname with configured prefix applied. |
 |
%simplenick_prefixed-mininick% |
Raw MiniMessage nickname with prefix. |
 |
Configuration
MySQL
Plugin uses a local .db SQLite by default. This requires no additional setup but cannot be shared between a network of servers.
If you would like to use MySQL, you can do so by enabling it and filling out the information in the configuration.
mysql:
enabled: false
ip: "localhost:3306"
name: simplenicks
username: username1
password: badpassword!
Nickname Length
This is the max length that someone's nickname can be after the colors and formats have been figured out.
So, if you're doing a nickname like
<blue>ThisIs</blue><green>AConvoluted</green><rainbow>Exam</rainbow><b>ple</b>
the text that will be checked will be ThisIsAConvolutedExample.
⚠️ ℹ️
It's not recommended to set the value below 3, as there may be unintended side effects.
# The max amount of characters a nickname should be, not including formatting
# (so a name like <red>Billy<yellow>Bob would only count 'BillyBob' - and would be 8 characters)
# Setting this number to any number below "3" could cause unintended side effects
max-nickname-length: 30
Nickname Regex
This is the allowed characters in a nickname. The default allows only alphanumeric characters and underscores [A-Za-z0-9_]+ - you can add additional characters into this, use a resource like to make sure your regex properly parses.
⚠️ ℹ️
Using non-alphanumeric characters is generally unsupported and can have unintended side effects.
# The regex of valid final nickname characters.
# Be warned that putting non-alphanumeric characters may result in issues with other plugins and other unintended side effects
nickname-regex: "[A-Za-z0-9_]+"
Require Permission
These set whether or not specific functionalities require a permission. If you don't know what a permissions plugin is, and you just want the plugin to work, you can set the functions you want to 'false'. If you do know what permissions are and how to use them, you probably don't need this section.
Nick
Gives functionality for:
/nick set
/nick reset
/nick save
Allows a player to change the name they appear as.
Color
Gives functionality for color tags, like <red>, <#aabbcc>, <rainbow>, <gradient:color1:color2>, and <reset>
Allows a player to change the name they appear as, and the color of their name.
Format
Gives functionality for formatting tags, like <u> (underline), <i> (italic), <b> (bold), <st> (strikethrough), and <obf> (ō̵̬b̵̧̛f̷̩̋u̵̳͂ş̸̓c̷̥̈́a̵͇͂t̸̯͋e̸͎̚d̷̟͝)
Who
Gives access to /nick who <name> which shows which username is associated with a specific nickname.
# What should require permission set by a permission plugin?
require-permission:
nick: true
color: true
format: true
who: false
Nickname Protection
Allows protecting nicknames that are already in use. This does not protect saved nicknames or protect nicknames from being saved.
Online Protection
Only prevents a player from taking the nickname of someone who is currently online. Allows people to use nicknames of people who are offline.
Offline Protection
Prevents players from using nicknames that someone else is actively using, regardless of if they're online or offline, provided the nickname expiry has not been reached.
Offline Protection Expires
Time in days someone needs to be away before their nickname protection expires, set to -1 if you do not want nickname protection to ever expire, but I wouldn't recommend that.
Username Protection
Prevents players from nicknaming themselves someone's username. Only checks against players who have actually logged into the server.
Username Protection Expires
This value controls the number of days someone needs to be offline before their username is considered allowed to be used as a nickname. Use -1 if you do not want the protection ever to expire
# Blocks certain names from being used as nicknames
# Expiration times are in days, setting to -1 will make it so it never expires
nickname-protection:
username:
enabled: true
expires: 30
online:
enabled: false
offline:
enabled: false
expires: 30
Max Saves
Controls how many nicknames players can save, there is not currently an override permission for this, it is applied for all players with save permissions
# How many nicknames can be saved?
max-saves: 5
Tablist Nick
Alters the tab list to use the current nicknames of players. If you have any plugin that already can handle this, I would suggest you use that, or use my other plugin Simple Custom Tab List because this option is very limited and prone to issues with other plugins. If you have a very simple server setup and you just want nicknames to show on tab list this will work, but if you have geyser, or other plugins that might alter scoreboard and other random stuff, you're gonna want a separate plugin to handle the tablist
# Should names be changed in tablist?
# (Keep this false if you use any other tablist plugin, there are placeholder API placeholders to use on those)
tablist-nick: false
Nickname Prefix
Sets what the prefix of nicknames should be.
Used in the display name of the player and placeholders %simplenick_prefixed-nickname% and %simplenick_prefixed-mininick%.
# What prefix should be given for players who have a nickname? put "" if you want no prefix
nickname-prefix: ""
Debug Mode
Enables development debug logging for this plugin.
⚠️ ℹ️
This will flood your logs and can make it virtually unreadable.
Do not enable unless advised to.
# Development option, this will flood your logs, discouraged from enabling unless asked
debug-mode: false
Migration from Older Versions
If you are upgrading from a version of SimpleNicks before SQL support:
- Data Storage:
- Old versions stored nicknames in YML or using the PersistentDataContainer (PDC).
- New versions use MySQL or SQLite. Existing data will be migrated automatically.
- Commands:
- Admin commands now live under
/nick admin instead of sharing player command structure.
/nick save can now accept arguments (/nick save <nickname>).
- Permissions:
- Color and format permissions were moved into their own nodes (
simplenick.color.* and simplenick.format.*).
- Color and format can now be allowed without permissions, check new config options
simplenick.admin.restrictive, simplenick.admin.basic and simplenick.admin.full were removed. The permission is now simplenick.admin.set
- Admin nickname setting always uses admin’s own permissions now. (Previously 'admin basic' functionality)
simplenick.admin.save was removed - since this is now using brigadier, you can use
- PlaceholderAPI:
- Placeholders were renamed for consistency.
评论 0
登录后参与评分
还没有评论,来抢沙发吧