Telegram 通知插件
本插件提供了一种在玩家加入或退出你的 Minecraft 服务器时,向 Telegram 聊天频道接收通知的方式。
安装
- 从 版本页面 下载最新版本。
- 将下载的 JAR 文件放入服务器的
plugins 文件夹中。
- 启动服务器。
配置
- 在安装好插件并启动服务器后,会在
plugins/TelegramNotifier 文件夹中生成一个 config.yml 文件。
- 打开
config.yml 文件并将 enabled 选项设置为 true。
- 获取 Telegram Bot API 令牌和聊天 ID。按照 这些说明 创建机器人并获取令牌,并按照 这些说明 获取聊天 ID。
- 在
config.yml 文件中设置 token 和 chatId 选项为第 3 步中获得的值。
- 将
prefix 选项设置为将在发送到 Telegram 聊天的消息中用作前缀的字符串(可选)。
用法
配置插件后,当有玩家加入或退出服务器时,你将在配置的 Telegram 聊天中收到通知。

路线图
- 添加对自定义消息的支持:目前,插件在玩家加入或退出服务器时会发送默认消息。添加支持可在插件配置文件中配置的自定义消息。
- 添加对本地化的支持:目前,插件仅支持单一语言。考虑添加对本地化的支持,以便插件可以在不同地区和语言中使用。这对于拥有国际玩家基础的服务器可能很有用。
- 添加有助于在不手动编辑配置文件的情况下设置插件的命令。
使用案例
该插件目前正在以下 Minecraft 服务器上运行:
贡献
欢迎对本项目做出贡献!如果你发现错误或有任何功能请求,请在 GitHub 仓库 上创建一个 Issue。如果你想贡献代码,请 Fork 仓库并创建一个 Pull Request。
许可证
本项目采用 MIT 许可证进行授权 - 详情请参阅 LICENSE 文件。
Telegram Notifier
This plugin provides a way to receive notifications on a Telegram chat when a player joins or quits your Minecraft server.
Installation
- Download the latest version from the versions page.
- Place the downloaded JAR file into your server's
plugins folder.
- Start the server.
Configuration
- After starting the server with the plugin installed, a
config.yml file will be generated in the plugins/TelegramNotifier folder.
- Open the
config.yml file and set the enabled option to true.
- Obtain a Telegram Bot API token and chat ID. Follow these instructions to create a bot and obtain the token, and these instructions to obtain the chat ID.
- Set the
token and chatId options in the config.yml file to the values obtained in step 3.
- Set the
prefix option to a string that will be used as a prefix in the messages sent to the Telegram chat (optional).
Usage
After configuring the plugin, you will receive a notification in the configured Telegram chat when a player joins or quits the server.

Roadmap
- Add support for custom messages: Currently, the plugin sends a default message when a player joins or quits the server. Add support for custom messages that can be configured in the plugin's configuration file.
- Add support for localization: Currently, the plugin only supports a single language. Consider adding support for localization, so that the plugin can be used in different regions and languages. This could be useful for servers with international player bases.
- Add commands that help to set up the plugin without editing config manually.
Used On
This plugin is currently being used on the following Minecraft server:
Contributing
Contributions to this project are welcome! If you find a bug or have a feature request, please create an issue on the GitHub repository. If you would like to contribute code, please fork the repository and create a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
评论 0
登录后参与评分
还没有评论,来抢沙发吧