RRPNames 是一款轻量级、高性能的插件,专为完美实现单一目标而设计:为您的角色扮演服务器提供一个强大且专业的命名系统。该插件注重性能与易用性,专注于质量与稳定性,为玩家和管理员提供无缝的体验。
忘掉那些试图包揽一切臃肿的插件吧。RRPNames 是角色身份的基础模块,提供了一个简洁、强大且对开发者友好的解决方案。
功能特性
直观的姓名设置: 当新玩家加入时,他们会通过聊天界面接受简单的姓名设置引导,并使用清晰的屏幕标题提示。无需记忆复杂的命令!
强大的验证引擎: 通过详细的 config.yml 配置文件自定义姓名验证的各个方面:
允许的语言: 选择使用西里尔字母 (CYRILLIC)、拉丁字母 (LATIN) 或任意字符集 (ANY)。
长度控制: 定义名和姓的最小与最大长度。
字符规则: 允许或禁止使用数字和连字符。
唯一姓名: 防止玩家注册重复的姓名。
自动大写: 自动将类似 jOhN dOE 的姓名格式化为 John Doe。
完整的管理员控制权: 提供一套完整的命令以便轻松管理:
/rpn set <nickname> <FirstName> <LastName> — 强制为任何玩家(即使离线)设置角色扮演姓名。
/rpn reset <nickname> — 重置玩家的姓名,并在其下次加入时提示其重新设置。
/rpn reload — 无需重启服务器即可重新加载配置文件。
无缝 PlaceholderAPI 集成: RRPNames 提供了一组丰富的占位符,可用于任何其他插件(如 TAB 栏、聊天管理器、记分板等):
%rrpnames_fullname% — 玩家的完整角色扮演姓名。
%rrpnames_firstname% — 仅名字部分。
%rrpnames_lastname% — 仅姓氏部分。
%rrpnames_initials% — 名字首字母加姓氏首字母(例如:“John D.”)。
自动更新检查器: 插件会自动在 GitHub 上检查新版本,并在游戏内和控制台中通知操作员,确保您始终运行最新、最稳定的版本。
广泛的开发者 API: RRPNames 是作为一个平台构建的。它暴露了一个强大且易于使用的 API,允许其他开发者创建附加组件,并将我们的命名系统集成到他们自己的插件中(例如用于 ID 卡、阵营或熟人系统)。
RRPNames 不仅仅是一个插件——它是您服务器上角色身份的终极基础。简单、快速且专业。
config.yml
# ---------------------------------------------------- #
# RRPNames by reallmerry #
# ---------------------------------------------------- #
# 插件所有消息中使用的前缀。
plugin-prefix: "&#EA3434&lr&lS&#DD2D35<&#D72A36&lu&#D12737&ld&#CA2337&li&#C42038&lo &c»&r"
# ---------------------------------------------------- #
# NAME SETUP SETTINGS #
# ---------------------------------------------------- #
setup:
# 是否在玩家设置姓名之前循环显示要求注册姓名的标题?
loop-title: true
# 重新发送标题的时间间隔(秒)。
loop-interval-seconds: 5
# 是否在设置姓名之前阻止玩家移动和聊天?
block-actions-before-setup: true
# ---------------------------------------------------- #
# NAME VALIDATION SETTINGS #
# ---------------------------------------------------- #
validation:
# 允许的姓名语言。
# CYRILLIC - 仅限西里尔字母(例如,а-я, А-Я)
# LATIN - 仅限拉丁字母(a-z, A-Z)
# ANY - 任意字母
language: "LATIN"
# 是否允许姓名中包含数字?(true/false)
allow-numbers: false
# 是否允许姓名中包含连字符?(例如,用于像 'Anne-Marie' 这样的名字)
allow-hyphens: true
# 名字的最小和最大长度。
min-firstname-length: 3
max-firstname-length: 15
# 姓氏的最小和最大长度。
min-lastname-length: 3
max-lastname-length: 15
# 是否防止不同玩家使用相同的角色扮演姓名?
prevent-duplicates: true
# 自动将名字和姓氏的首字母大写,其余字母小写。
# 例如,"jOHn DOE" -> "John Doe"
force-capitalization: true
# ---------------------------------------------------- #
# PLACEHOLDERAPI INTEGRATION #
# ---------------------------------------------------- #
display:
placeholders:
# 如果未设置角色扮演姓名,占位符应显示的内容。
# 例如,%rrpnames_fullname% 将返回 "Unknown"
name-not-set-text: "Unknown"
# ---------------------------------------------------- #
# MESSAGES #
# ---------------------------------------------------- #
messages:
# 需要设置姓名时显示的标题和副标题。
setup-title: "&f请输入您的姓名"
setup-subtitle: "&f格式&7: FirstName LastName&f,例如&7: John Doe"
# 验证错误消息。
error-invalid-format: "&c格式无效。请使用&7: FirstName LastName"
error-firstname-too-short: "&c名字太短。最少字符数: %min%"
error-firstname-too-long: "&c名字太长。最多字符数: %max%"
error-lastname-too-short: "&c姓氏太短。最少字符数: %min%"
error-lastname-too-long: "&c姓氏太长。最多字符数: %max%"
error-invalid-characters: "&c姓名包含无效字符。请检查语言和特殊符号。"
error-name-taken: "&c此姓名已被占用。请选择其他名称。"
# 成功设置姓名。
success-name-set: "您已成功注册您的姓名!"
# 面向管理员的消息。
admin-reset-success: "&a您已重置玩家 &f%player%&a 的资源包名称。"
admin-set-success: "&a您已强制为玩家 &f%player%&a 设置名称 &f%name%&a。"
admin-player-not-found: "&c未找到玩家 &f%player%&c。"
admin-reload-success: "&a配置已成功重新加载。"
# 管理员帮助菜单。
admin-help-message:
- "&f&l管理员命令:"
- "&e/rpn reload &7- 重新加载插件配置。"
- "&e/rpn set <昵称> <名> <姓> &7- 强制设置玩家名称。"
- "&e/rpn reset <昵称> &7- 重置玩家名称并强制其重新设置。"
RRPNames is a lightweight, high-performance plugin designed to do one thing perfectly: provide your RolePlay server with a robust and professional naming system. Built with performance and ease of use in mind, RRPNames focuses on quality and stability, offering a seamless experience for both players and administrators.
Forget bulky plugins that try to do everything. RRPNames is the foundational block for character identity, providing a clean, powerful, and developer-friendly solution.
Features
Intuitive Name Setup: When a new player joins, they are guided through a simple name setup process directly in chat, using clear on-screen titles. No complex commands to memorize!
Powerful Validation Engine: Customize every aspect of name validation through a detailed config.yml:
Allowed Languages: Choose between CYRILLIC, LATIN, or ANY character sets.
Length Control: Define minimum and maximum lengths for both first and last names.
Character Rules: Allow or disallow numbers and hyphens.
Unique Names: Prevent players from registering duplicate names.
Auto-Capitalization: Automatically format names like jOhN dOE to John Doe.
Full Administrator Control: A complete suite of commands for easy management:
/rpn set <nickname> <FirstName> <LastName> — Force-set an RP name for any player, even if they are offline.
/rpn reset <nickname> — Reset a player's name and prompt them to set a new one on their next join.
/rpn reload — Reload the configuration file without restarting the server.
Seamless PlaceholderAPI Integration: RRPNames provides a rich set of placeholders for use in any other plugin (TAB, chat managers, scoreboards, etc.):
%rrpnames_fullname% — The player's full RP name.
%rrpnames_firstname% — The first name only.
%rrpnames_lastname% — The last name only.
%rrpnames_initials% — The first name and last initial (e.g., "John D.").
Automatic Update Checker: The plugin automatically checks for new versions on GitHub, notifying operators in-game and in the console to ensure you're always running the latest, most stable release.
Extensive Developer API: RRPNames is built as a platform. It exposes a powerful and easy-to-use API, allowing other developers to create addons and integrate our naming system into their own plugins (e.g., for ID cards, factions, or acquaintance systems).
RRPNames is more than just a plugin—it's the definitive foundation for character identity on your server. Simple, fast, and done right.
config.yml
# ---------------------------------------------------- #
# RRPNames by reallmerry #
# ---------------------------------------------------- #
# The prefix used in all plugin messages.
plugin-prefix: "&#EA3434&lr&lS&#DD2D35<&#D72A36&lu&#D12737&ld&#CA2337&li&#C42038&lo &c»&r"
# ---------------------------------------------------- #
# NAME SETUP SETTINGS #
# ---------------------------------------------------- #
setup:
# Should the title asking for name registration be looped until the player sets a name?
loop-title: true
# The interval in seconds for resending the title.
loop-interval-seconds: 5
# Should player movement and chat be blocked until a name is set?
block-actions-before-setup: true
# ---------------------------------------------------- #
# NAME VALIDATION SETTINGS #
# ---------------------------------------------------- #
validation:
# The allowed language for names.
# CYRILLIC - Only Cyrillic letters (e.g., а-я, А-Я)
# LATIN - Only Latin letters (a-z, A-Z)
# ANY - Any letters
language: "LATIN"
# Allow numbers in the name? (true/false)
allow-numbers: false
# Allow hyphens in the name? (e.g., for names like 'Anne-Marie')
allow-hyphens: true
# Minimum and maximum length for the first name.
min-firstname-length: 3
max-firstname-length: 15
# Minimum and maximum length for the last name.
min-lastname-length: 3
max-lastname-length: 15
# Prevent different players from using the same RP name?
prevent-duplicates: true
# Automatically capitalize the first letter of the first and last name, making others lowercase.
# For example, "jOHn DOE" -> "John Doe"
force-capitalization: true
# ---------------------------------------------------- #
# PLACEHOLDERAPI INTEGRATION #
# ---------------------------------------------------- #
display:
placeholders:
# What to display in placeholders if the RP name is not set.
# For example, %rrpnames_fullname% will return "Unknown"
name-not-set-text: "Unknown"
# ---------------------------------------------------- #
# MESSAGES #
# ---------------------------------------------------- #
messages:
# Title and subtitle shown when a name needs to be set.
setup-title: "&fPlease enter your name"
setup-subtitle: "&fFormat&7: FirstName LastName&f, for example&7: John Doe"
# Validation error messages.
error-invalid-format: "&cInvalid format. Use&7: FirstName LastName"
error-firstname-too-short: "&cFirst name is too short. Minimum characters: %min%"
error-firstname-too-long: "&cFirst name is too long. Maximum characters: %max%"
error-lastname-too-short: "&cLast name is too short. Minimum characters: %min%"
error-lastname-too-long: "&cLast name is too long. Maximum characters: %max%"
error-invalid-characters: "&cName contains invalid characters. Check language and special symbols."
error-name-taken: "&cThis name is already taken. Please choose another one."
# Successful name setup.
success-name-set: "You have successfully registered your name!"
# Messages for administrators.
admin-reset-success: "&aYou have reset the RP name for player &f%player%&a."
admin-set-success: "&aYou have forcefully set the name &f%name%&a for player &f%player%&a."
admin-player-not-found: "&cPlayer &f%player%&c not found."
admin-reload-success: "&aConfiguration successfully reloaded."
# Help menu for administrators.
admin-help-message:
- "&f&lAdministrator Commands:"
- "&e/rpn reload &7- Reload the plugin's configuration."
- "&e/rpn set <nickname> <FirstName> <LastName> &7- Forcefully set a player's name."
- "&e/rpn reset <nickname> &7- Reset a player's name and force them to set it again."
评论 0
登录后参与评分
还没有评论,来抢沙发吧