RPPlugin
适用于运行 Paper、Spigot 或 Bukkit 1.16 - 26.3 的 Minecraft 服务器的角色扮演插件。它为角色扮演服务器、活动和生存社区添加了角色内通信命令。
简介
RPPlugin 提供了用于角色动作、环境描述、掷骰子、概率判定、私密耳语、大声呼喊和表情动作的命令。它专为希望在不安装完整角色扮演框架的情况下启用沉浸式角色扮演的服务器管理员而设计。
消息会根据可配置的距离发送给附近的玩家,因此本地聊天保持本地化。格式和消息均可配置,并包含英文和俄文翻译。可以通过复制 config.yml 中的消息部分来添加其他语言。
该插件没有外部依赖项,并使用标准的 Bukkit 命令系统。支持对玩家名称、骰子示例、表情动作和 /rp help 进行 Tab 补全。
功能
- 添加
/me、/do、/try、/roll、/whisper、/yell、/emote 和 /rp help 命令。
- 支持基于距离的消息传递。
use_distance 切换检查开关,message_distance 设置默认范围。/yell 使用双倍距离。
- 使用简单、范围和骰子符号格式掷随机数和骰子。示例:
/roll 20、/roll 5-15、/roll d6、/roll 2d10、/roll 1d20+5、/roll 3d6+2。
- 通过
settings.try_success_chance 以可配置的成功率尝试行动。默认为 0.5。
- 发送具有不同格式的耳语和呼喊。
- 执行预定义的表情动作,可选目标对象。表情动作在
config.yml 下的 emotes 中定义。
- 通过
config.yml 中的 formats 格式化所有命令输出,支持颜色代码。
- 随附
messages 下的英文和俄文消息。将 language 设置为 en 或 ru。
- 提供对玩家名称、掷骰示例、表情动作和
/rp help 的 Tab 补全。
- 没有外部依赖项。
安装
- 下载 RPPlugin
1.3 JAR 文件。
- 将 JAR 文件放入服务器的
plugins 文件夹中。
- 重启服务器或使用插件管理器加载插件。
- 编辑
plugins/RPPlugin/config.yml 以匹配您的服务器。
- 在游戏中运行
/rp help 查看可用命令。
无需额外设置。插件使用默认命令权限,除非你的权限插件限制了它们,否则所有玩家都可以使用这些命令。
用法
| 命令 |
权限 |
描述 |
/me <action> |
无 |
以第三人称描述角色的动作。 |
/do <action> |
无 |
描述附近发生的事件或环境动作。 |
/roll <number> |
无 |
从 1 到给定值掷一个随机数。 |
/roll <min>-<max> |
无 |
在给定范围内掷一个随机数。 |
/roll <amount>d<sides>[+/-<modifier>] |
无 |
掷骰子,可选修饰符。示例:2d6+3、1d20。 |
/try <action> |
无 |
以可配置的成功率尝试行动。 |
/whisper <message> |
无 |
向附近的玩家发送安静消息。 |
/yell <message> |
无 |
向两倍于默认距离内的玩家发送大声消息。 |
/emote <emote> [target] |
无 |
执行预定义的表情动作,可选目标玩家。 |
/rp help |
无 |
显示命令帮助。 |
插件未在 plugin.yml 中定义权限节点。仅当手动添加节点或使用命令限制插件时,访问才由服务器的权限系统控制。
配置
插件会生成 plugins/RPPlugin/config.yml。最重要的设置如下:
language: "en"
settings:
message_distance: 100.0
use_distance: true
try_success_chance: 0.5
formats:
me: "&d* %player% %action% *"
do: "&e* %action% (%player%) *"
roll_simple: "&a%player% rolls %roll% (1-%max%)"
roll_range: "&a%player% rolls %roll% (%min%-%max%)"
roll_dice: "&a%player% rolls %roll% (%expression%)"
try_success: "&9%player% tries to %action% and succeeds!"
try_fail: "&9%player% tries to %action% and fails!"
whisper: "&7[Whisper] %player%: %message%"
yell: "&c[Yell] %player%: %message%"
emote: "&6* %player% %emote% %target% *"
emotes:
wave: "waves"
cry: "cries"
dance: "dances"
laugh: "laughs"
bow: "bows"
nod: "nods"
shake: "shakes head"
shrug: "shrugs"
smile: "smiles"
wink: "winks"
messages:
en:
player_only: "This command can only be used by players."
me_usage: "Usage: /me <action>"
do_usage: "Usage: /do <action>"
roll_usage: "Usage: /roll <number> or /roll <min>-<max> or /roll <amount>d<sides>[+/-<modifier>]"
try_usage: "Usage: /try <action>"
whisper_usage: "Usage: /whisper <message>"
yell_usage: "Usage: /yell <message>"
emote_usage: "Usage: /emote <emote> [target]"
positive_number: "Please provide a positive number."
rolled: "rolled"
tries: "tries to"
succeeds: "and succeeds!"
fails: "and fails."
help_header: "Roleplay Plugin Commands:"
me_description: "Express an action in the first person."
do_description: "Describe an action or event happening nearby."
roll_description: "Roll a random number or dice."
try_description: "Attempt an action with a configurable chance of success."
whisper_description: "Send a message with a short distance."
yell_description: "Send a message with a long distance."
emote_description: "Perform an emote."
help_description: "Show this help message."
rp_help_usage: "Usage: /rp help"
emote_not_found: "Emote not found. Use /rp help to see available emotes."
```yaml
ru:
player_only: "只有玩家才能使用这些命令。"
me_usage: "用法:/me <动作>"
do_usage: "用法:/do <动作>"
roll_usage: "用法:/roll <数字> 或 /roll <最小值>-<最大值> 或 /roll <数量>d<面数>[+/-<修正值>]"
try_usage: "用法:/try <动作>"
whisper_usage: "用法:/whisper <消息>"
yell_usage: "用法:/yell <消息>"
emote_usage: "用法:/emote <表情> [目标]"
positive_number: "数字必须大于零。"
rolled: " 掷出了 "
tries: " 尝试 "
succeeds: " 成功!"
fails: " 失败!"
help_header: "RP 命令帮助:"
me_description: "以第三人称描述动作。"
do_description: "描述正在发生的动作或事件。"
roll_description: "掷随机数或骰子。"
try_description: "尝试执行带有自定义成功率的动作。"
whisper_description: "向附近发送消息。"
yell_description: "向远处发送消息。"
emote_description: "执行表情动作。"
help_description: "显示此帮助信息。"
rp_help_usage: "用法:/rp help"
emote_not_found: "未找到该表情。请使用 /rp help 查看表情列表。"
language 用于选择消息集。内置选项为 en 和 ru。message_distance 控制 /me、/do、/try、/whisper 和 /emote 的默认距离范围。/yell 使用该值的两倍。将 use_distance 设置为 false 可禁用距离检查,使消息变为全局广播。try_success_chance 设置 /try 的成功概率,取值范围为 0.0 到 1.0。formats 定义每个命令的输出格式,支持 & 颜色代码和占位符。emotes 将表情键映射到动作文本。通过在 emotes 下添加新的键来添加新表情。
消息位于 messages 下。要添加一种语言,请复制 en 或 ru 区块,翻译其中的值,并将 language 设置为新语言的键名。
兼容性
- Minecraft:1.16 - 26.3
- 平台:Paper、Spigot、Bukkit
- Java:服务器平台支持的任何版本;无需特定的 Java 版本
与其他插件或库无已知不兼容问题。
技术栈
- 语言:Java
- 平台 API:Bukkit、Spigot、Paper
- 构建方式:标准插件 JAR
- 关键依赖:无
许可证
本项目根据 GNU 通用公共许可证 v3.0 发布。
RPPlugin
A roleplay plugin for Minecraft servers running Paper, Spigot, or Bukkit 1.16 - 26.3. It adds in-character communication commands for roleplay servers, events, and survival communities.
What is it
RPPlugin provides commands for character actions, environmental descriptions, dice rolls, chance-based attempts, private whispers, loud yells, and emotes. It is built for server administrators who want to enable immersive roleplay without installing a full roleplay framework.
Messages are delivered to nearby players based on configurable distance, so local chat remains local. Formats and messages are configurable, with English and Russian translations included. Additional languages can be added by copying a message section in config.yml.
The plugin has no external dependencies and uses the standard Bukkit command system. Tab completion is available for player names, dice examples, emotes, and /rp help.
Features
- Adds
/me, /do, /try, /roll, /whisper, /yell, /emote, and /rp help.
- Supports distance-based message delivery.
use_distance toggles the check, and message_distance sets the default range. /yell uses twice that distance.
- Rolls random numbers and dice with simple, range, and dice notation formats. Examples:
/roll 20, /roll 5-15, /roll d6, /roll 2d10, /roll 1d20+5, /roll 3d6+2.
- Attempts actions with a configurable success chance through
settings.try_success_chance. Default is 0.5.
- Sends whispers and yells with distinct formats.
- Performs predefined emotes with an optional target. Emotes are defined under
emotes in config.yml.
- Formats every command output through
formats in config.yml, with color code support.
- Ships with English and Russian messages under
messages. Set language to en or ru.
- Provides tab completion for player names, roll examples, emotes, and
/rp help.
- Has no external dependencies.
Installation
- Download the RPPlugin
1.3 JAR.
- Place the JAR in your server's
plugins folder.
- Restart the server or load the plugin with a plugin manager.
- Edit
plugins/RPPlugin/config.yml to match your server.
- Run
/rp help in game to see available commands.
No additional setup is required. The plugin uses the default command permissions, so all players can use the commands unless your permission plugin restricts them.
Usage
| Command |
Permission |
Description |
/me <action> |
None |
Describes your character's action in the third person. |
/do <action> |
None |
Describes an event or environmental action nearby. |
/roll <number> |
None |
Rolls a random number from 1 to the given value. |
/roll <min>-<max> |
None |
Rolls a random number in the given range. |
/roll <amount>d<sides>[+/-<modifier>] |
None |
Rolls dice with optional modifier. Examples: 2d6+3, 1d20. |
/try <action> |
None |
Attempts an action with a configurable chance of success. |
/whisper <message> |
None |
Sends a quiet message to nearby players. |
/yell <message> |
None |
Sends a loud message to players within twice the default distance. |
/emote <emote> [target] |
None |
Performs a predefined emote, optionally targeting a player. |
/rp help |
None |
Shows command help. |
The plugin does not define permission nodes in plugin.yml. Access is controlled by the server's permission system only if you add nodes manually or use a command restriction plugin.
Configuration
The plugin generates plugins/RPPlugin/config.yml. The most important settings are:
language: "en"
settings:
message_distance: 100.0
use_distance: true
try_success_chance: 0.5
formats:
me: "&d* %player% %action% *"
do: "&e* %action% (%player%) *"
roll_simple: "&a%player% rolls %roll% (1-%max%)"
roll_range: "&a%player% rolls %roll% (%min%-%max%)"
roll_dice: "&a%player% rolls %roll% (%expression%)"
try_success: "&9%player% tries to %action% and succeeds!"
try_fail: "&9%player% tries to %action% and fails!"
whisper: "&7[Whisper] %player%: %message%"
yell: "&c[Yell] %player%: %message%"
emote: "&6* %player% %emote% %target% *"
emotes:
wave: "waves"
cry: "cries"
dance: "dances"
laugh: "laughs"
bow: "bows"
nod: "nods"
shake: "shakes head"
shrug: "shrugs"
smile: "smiles"
wink: "winks"
messages:
en:
player_only: "This command can only be used by players."
me_usage: "Usage: /me <action>"
do_usage: "Usage: /do <action>"
roll_usage: "Usage: /roll <number> or /roll <min>-<max> or /roll <amount>d<sides>[+/-<modifier>]"
try_usage: "Usage: /try <action>"
whisper_usage: "Usage: /whisper <message>"
yell_usage: "Usage: /yell <message>"
emote_usage: "Usage: /emote <emote> [target]"
positive_number: "Please provide a positive number."
rolled: "rolled"
tries: "tries to"
succeeds: "and succeeds!"
fails: "and fails."
help_header: "Roleplay Plugin Commands:"
me_description: "Express an action in the first person."
do_description: "Describe an action or event happening nearby."
roll_description: "Roll a random number or dice."
try_description: "Attempt an action with a configurable chance of success."
whisper_description: "Send a message with a short distance."
yell_description: "Send a message with a long distance."
emote_description: "Perform an emote."
help_description: "Show this help message."
rp_help_usage: "Usage: /rp help"
emote_not_found: "Emote not found. Use /rp help to see available emotes."
ru:
player_only: "Только игроки могут использовать эти команды."
me_usage: "Использование: /me <действие>"
do_usage: "Использование: /do <действие>"
roll_usage: "Использование: /roll <число> или /roll <мин>-<макс> или /roll <кол-во>d<грани>[+/-<модификатор>]"
try_usage: "Использование: /try <действие>"
whisper_usage: "Использование: /whisper <сообщение>"
yell_usage: "Использование: /yell <сообщение>"
emote_usage: "Использование: /emote <эмоция> [цель]"
positive_number: "Число должно быть больше нуля."
rolled: " выбросил "
tries: " пытается "
succeeds: " и удается!"
fails: " и не удается!"
help_header: "Справка по RP командам:"
me_description: "Описывает действие от третьего лица."
do_description: "Описывает происходящее действие или событие."
roll_description: "Бросает случайное число или кости."
try_description: "Пытается выполнить действие с настраиваемым шансом."
whisper_description: "Отправляет сообщение на короткое расстояние."
yell_description: "Отправляет сообщение на большое расстояние."
emote_description: "Выполняет эмоцию."
help_description: "Показывает это сообщение."
rp_help_usage: "Использование: /rp help"
emote_not_found: "Эмоция не найдена. Используйте /rp help для списка эмоций."
language selects the message set. Built-in values are en and ru. message_distance controls the default range for /me, /do, /try, /whisper, and /emote. /yell uses twice this value. use_distance disables distance checks when set to false, making messages global. try_success_chance sets the success probability for /try and accepts values from 0.0 to 1.0. formats defines output for each command and supports & color codes and placeholders. emotes maps emote keys to action text. Add new emotes by adding keys under emotes.
Messages are under messages. To add a language, copy the en or ru block, translate the values, and set language to the new key.
Compatibility
- Minecraft: 1.16 - 26.3
- Platform: Paper, Spigot, Bukkit
- Java: any version supported by the server platform; no specific Java version is required
No known incompatibilities with other plugins or libraries.
Technologies
- Language: Java
- Platform API: Bukkit, Spigot, Paper
- Build: standard plugin JAR
- Key dependencies: none
License
This project is distributed under the GNU General Public License v3.0.
评论 0
登录后参与评分
还没有评论,来抢沙发吧