跳到正文

Don’t Sleep

作者:DominoWWW

If a player needs the night on a multiplayer server, they can use a command to remind other players not to sleep.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Don’t Sleep

Download: Modrinth

For minecraft 26.1 – 26.3!

Allows players to remind others not to sleep bu using the command /trigger Dont_Sleep!

Features

  • Displayes who is sleeping in chat.
  • Players can toggle if they need the night using the command /trigger Dont_Sleep!
  • Automatically toggles off in the morning or if the player people sleeps/leaves.
  • If a player sleeps while the toggle is active, they will hear an alarm and see bold text telling them that someone needs the night.

Preview

A gif demonstrating the datapack.

Wiki

Installing:

Insert the zip file into your datapacks folder.

Uninstalling:

Run the command /function dont_sleep:uninstall and delete the zip file.

Commands:

| Command | Descriptions |
| — | — |
| “/trigger Dont_Sleep` | Toggle Dont Sleep |<br>
|
`/function dont_sleep:uninstall“ | Uninstalls datapack |

Contributing

Clone the repository and install the development tools in a Python virtual environment:

git clone https://github.com/DominoWWW/Dont-Sleep.git
cd Dont-Sleep
python -m venv .venv
source .venv/bin/activate
python -m pip install beet bolt
build

Build the datapack with:

beet build
Testing

Individual Tests: \
You need carpet mod installed to run the tests.

/test run dont_sleep:trigger
/test run dont_sleep:time_cancels_trigger
/test run dont_sleep:sleep_cancels_trigger
/test run dont_sleep:leave_cancels_trigger

Run test server: \
You need carpet mod and GameTest Fabric installed on a fabric server
Test server start command:

java -DbundlerMainClass="net.minecraft.gametest.Main" -jar server.jar --packs "<path/to/dir/with/the/datapack>"

常见问题

Don’t Sleep 支持哪些 Minecraft 版本?

Don’t Sleep 支持 Minecraft Java 版 1.21–26.3,共 17 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。

Don’t Sleep 怎么安装?

新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。

评论

登录后评论和评分

DominoWWW 的其他作品

查看全部 →