Skip to content

Commit

Permalink
docs: 更新自述文件
Browse files Browse the repository at this point in the history
  • Loading branch information
HIM049 committed Nov 16, 2024
1 parent 8ce26db commit 2d59fdc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,32 @@
A MCDReforged plugin. When there are no player in the server, the plugin can make it shutdown. And if someone want to visit the server, the plugin can make the server start again.
If you like this plugin, plesae give me a star!

After version 1.1.0, you can use `!!hr sleep` and`!!hr wakeup` command to manually control the server.

After version `1.2.0`, you can modify the `blacklist_player` field in the config to ignore the specified player(s) who is on the server and continue to hibernate. This can be used to ignore some bots(fake player) and continue hibernation (recommend for use with fakePlayerResident). Configure this as follows:
## Commends
You can use these commends below to control this plugin: (version >= 1.2.2)
- Hibernate server `!!hr sleep`
- Wakeup server `!!hr wakeup`
- Start fakeserver `!!hr wakeup fs`

`"blacklist_player": ["player1", "player2"]`
## Config file comment
**If it's the first time you use this plugin,you should make sure that `IP` and `PORT` in the file is same with your minecraft server.**

- `MOTD`: The MOTD that displayed on the server list.
- `version_text`: The text displayed on the player count position.
- `samples`: The text displayed when the mouse hover on `version_text`.
- `kick_message`: The message that displayed to player who try to connect to server.
- `server_icon`: The icon displayed on the server list.
- `blacklist_player`: The player ignored when server try to hibernate.

## Sample of blacklist
The `blacklist_player` in the config file can used to ingore specific players when the plugin countting. This config often used to ingnore some carpet bots.

Example: `"blacklist_player": ["player1", "player2"]`

Hibernation countdown will continue even both player or any of them in server.

![Sleep](https://github.com/HIM049/MCDR_HibernateR/assets/67405384/3a20a813-9bca-4e40-942c-1dbeaac225b9)

## 代码参考

## Code references
https://github.com/Dark-Night-Base/Hibernate
https://github.com/ZockerSK/FakeMCServer
20 changes: 18 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,25 @@
一个MCDReforged插件,可以在服务器没有玩家的时候自动关闭服务器。有玩家尝试访问的时候开启服务器。
如果您觉得该插件还不错,请点一个Star!

`1.1.0` 版本后,你可以使用 `!!hr sleep``!!hr wakeup` 命令来手动控制服务端。

`1.2.0` 版本后,你可以在配置文件中修改`blacklist_player`字段来实现忽略指定的正在服务器的玩家,继续执行休眠。这可以用于无视一些假人进入休眠(配合假人驻留更佳)。配置方法如下:
## 插件控制命令
你可以使用如下命令控制插件:(version >= 1.2.2)
- 手动休眠服务器 `!!hr sleep`
- 手动唤醒服务器 `!!hr wakeup`
- 手动启动伪装服务器 `!!hr wakeup fs`

## 配置文件解释
**在第一次使用时,你需要修改配置文件中伪装服务器的 IP 与 PORT 字段与当前服务器保持一致。才可以让插件正常发挥作用。**

- `MOTD`:玩家在服务器列表中可以看到的服务器 MOTD
- `version_text`: 显示在服务器列表玩家人数位置的信息
- `samples`: 鼠标悬停于 `version_text` 时显示的玩家列表内容
- `kick_message`:玩家进入服务器后显示的提示
- `server_icon`:服务器列表中显示的图标
- `blacklist_player`:计算人数时忽视的玩家列表

## 黑名单设置方法
配置文件中的 `blacklist_player` 字段可以用于在计算人数时忽略指定的玩家,继续执行休眠。这通常用于无视一些假人进入休眠(配合假人驻留更佳)。配置方法如下:

`"blacklist_player": ["player1", "player2"]`

Expand Down

0 comments on commit 2d59fdc

Please sign in to comment.