## 描述
这个Spigot插件,适用于最新版本的Minecraft,在玩家加入、离开、执行特定命令、进行某些操作或服务器启动/关闭时,会自动向推送服务 (ntfy.sh) 发送通知。
这有助于服务器所有者和玩家实时了解服务器活动。
## 想法
如果您有更多事件的想法,请提交一个问题。
## Java 版本
兼容 Minecraft 1.20.6,需要 Java 21。
## 特性
- 在服务器启动或关闭时通知。
- 发送推送通知,当
- 玩家加入或离开服务器。
- 玩家解锁成就。
- 玩家创建传送门。
- 玩家死亡(包括死亡消息)。
- 执行 `/spe [消息内容]` 进行自定义通知(带有自定义权限)。
- 更改消息格式或完全禁用/启用它们。
- 易于与 ntfy.sh 推送服务集成。
- 快速设置,只需少量配置。
- 检查并通知特定玩家命令:
- `/op`
- `/deop`
- `/ban`
- `/banip`
- `/pardon`
- `/pardonip`
- `/whitelist`
## 设置
要设置 SimplePushEvents 插件,请按照以下步骤操作:
1. **安装插件**:将 SimplePushEvents 插件下载到您的 Spigot Minecraft 服务器的 plugins 目录中。
2. **配置插件**:首次运行插件时,将在 `plugins/simplepushevents` 目录中生成一个配置文件 (`options.yml`)。编辑此文件以自定义您的消息和设置。
3. **下载 ntfy.sh App**:访问 [ntfy.sh](https://ntfy.sh/) 网站,从 Play Store 或 App Store 下载 ntfy app。ntfy.sh 服务完全免费使用。
4. **订阅推送频道**:打开 ntfy app,订阅在 `donottouch.pushchannel` 配置文件设置中指定的 topic。这将允许您接收插件发送的通知。
5. **重启/重新加载服务器**:重启或重新加载您的 Spigot Minecraft 服务器以应用配置更改。
6. **接收通知**:现在,插件将根据您的配置设置自动发送通知,每当玩家加入、离开或服务器启动/关闭时。
## 插件配置
在部署插件之前,请确保在 `options.yml` 文件中配置以下参数:
```yaml
donottouch:
configexists: true
pushchannel: 7fc647dd98
messages:
general:
title: 'Minecraft 服务器:'
startup:
status: true
content: 服务器已上线!
poweroff:
status: true
content: 服务器正在关闭!
chatcommand:
status: true
content: '[%PLAYER%] 说了: %MESSAGE%'
permission: spe.usechatcommand
player:
advancement:
status: true
content: 玩家 %PLAYER% 解锁了成就: %NAME%
join:
status: true
content: 玩家 %PLAYER% 加入!
leave:
status: true
content: 玩家 %PLAYER% 离开!
count:
status: true
content: 当前在线玩家: %ONLINE%/%MAX%
death:
status: true
content: 玩家 %PLAYER% 死亡: %MESSAGE%
portalcreation:
status: true
content: 玩家 %PLAYER% 在 %LOCATION% 创建了一个传送门
command:
disableall: false
op:
status: true
content: 玩家 %PLAYER% 为 %TARGET% 执行了 /op 命令!
deop:
status: true
content: 玩家 %PLAYER% 为 %TARGET% 执行了 /deop 命令!
ban:
status: true
content: 玩家 %PLAYER% 为 %TARGET% 执行了 /ban 命令!
banip:
status: true
content: 玩家 %PLAYER% 为 %TARGET% 执行了 /ban-ip 命令!
pardon:
status: true
content: 玩家 %PLAYER% 为 %TARGET% 执行了 /pardon 命令!
pardonip:
status: true
content: 玩家 %PLAYER% 为 %TARGET% 执行了 /pardon-ip 命令!
whitelist:
status: true
content: 玩家 %PLAYER% 使用了一个白名单命令: %CONTENT%
```
## 注意
确保您的服务器可以访问 ntfy.sh 推送服务,因为此插件依赖于它来发送通知。该服务是免费的,只需要您下载应用程序并订阅特定的推送频道主题。
## 免责声明
此插件按原样提供,不提供任何担保。开发者对因使用该插件而产生的任何问题或损害概不负责。