P_Alerta 插件 – 说明
P_Alerta 插件提供了一个命令,用于向 Minecraft 服务器中所有在线玩家广播自定义的警报消息。警报以标题、副标题和操作栏消息的形式显示,支持传统颜色代码(&)、MiniMessage 格式、PlaceholderAPI 占位符以及可配置的声音效果。
该插件确保所有消息格式正确,并在超过配置的字符限制时自动截断。
命令
/alerta
描述:
向所有在线玩家发送警报消息。
标题使用可配置的前缀(默认为红色 [ALERTA]),而副标题和操作栏则显示发送者提供的消息。
功能:
支持传统颜色代码(&)
支持 MiniMessage 现代格式
支持 PlaceholderAPI 占位符(如果已安装)
在发送警报时播放可配置的声音
自动截断过长的消息
可配置的操作栏持续时间和刷新率
权限:p_alerta.alerta
用法示例
/alerta &cAtenção! Evento começará em 5 minutos!
向所有玩家发送一条红色的警报:“Atenção! Evento começará em 5 minutos!”
/alerta <red>Manutenção programada às 14:00</red>
使用 MiniMessage 格式发送一条红色的维护警报。
行为
如果没有玩家在线,命令发送者会收到通知。
如果消息为空,发送者会收到警告,提示消息不能为空。
超过最大长度配置(title-max-length, actionbar-max-length)的消息会自动缩短并添加 ....
操作栏消息按照配置的持续时间(actionbar-duration-ticks)显示,并每 0.2 秒刷新一次。
如果启用了 PlaceholderAPI,消息中的占位符会根据每个玩家进行替换。
发送警报时,可以为所有玩家播放可配置的声音效果(alert-sound, sound-volume, sound-pitch)。
P_Alerta Plugin – Description
The P_Alerta plugin provides a command for broadcasting customizable alert messages to all online players on a Minecraft server. Alerts are displayed as titles, subtitles, and action bar messages, with support for legacy color codes (&), MiniMessage formatting, PlaceholderAPI placeholders, and configurable sound effects.
The plugin ensures all messages are correctly formatted and automatically truncated if they exceed the configured character limits.
Commands
/alerta
Description:
Sends an alert message to all online players.
The title uses a configurable prefix (default: [ALERTA] in red), while the subtitle and action bar show the message provided by the sender.
Features:
Supports legacy color codes (&)
Supports MiniMessage modern formatting
Supports PlaceholderAPI placeholders (if installed)
Plays a configurable sound when the alert is sent
Automatically truncates oversized messages
Configurable action bar duration and refresh rate
Permission: p_alerta.alerta
Usage Examples
/alerta &cAtenção! Evento começará em 5 minutos!
Sends a red alert saying “Atenção! Evento começará em 5 minutos!” to all players.
/alerta <red>Manutenção programada às 14:00</red>
Uses MiniMessage formatting to send a red maintenance alert.
Behavior
If no players are online, the command sender is notified.
If the message is empty, the sender receives a warning that the message cannot be empty.
Messages exceeding the configured maximum lengths (title-max-length, actionbar-max-length) are automatically shortened with ....
The action bar message persists for the configured duration (actionbar-duration-ticks) and refreshes every 0.2 seconds.
If PlaceholderAPI is enabled, placeholders in the message are replaced per player.
A configurable sound effect (alert-sound, sound-volume, sound-pitch) can be played for all players when sending an alert.
评论 0
登录后参与评分
还没有评论,来抢沙发吧