
Onlysleep
一人入睡,全员苏醒。
Onlysleep 让你的服务器无需等待所有玩家找到床铺即可跳过夜晚。默认情况下只需一名玩家入睡即可,但你也可以设置 0% 到 100% 之间的任意比例阈值。安装 JAR 文件并重启服务器,默认配置即可直接使用。

- 默认只需一名玩家入睡,支持配置百分比阈值
- 每个世界独立的睡眠计数
- 雨和雷暴清除的独立控制
- Boss 栏、动作栏、标题和进度条反馈
- 可配置的进入床铺和成功跳过夜晚的声音效果
- 内置 AFK(挂机)追踪,以及 EssentialsX 和 CMI 支持
- 支持过滤旁观者、创造模式玩家、飞行玩家、游戏模式及拥有豁免权限的玩家
- 自动处理
playersSleepingPercentage 游戏规则
- 支持 PlaceholderAPI 获取睡眠、世界和状态数据
- 可选的更新检查和匿名 bStats 指标收集


要求: Minecraft 26.3 及 Java 25 或更高版本。Onlysleep 可独立运行;PlaceholderAPI 为可选组件。


别名: /os, /sleep

| 权限 |
默认值 |
描述 |
onlysleep.* |
OP |
所有权限 |
onlysleep.command |
Everyone |
使用命令 |
onlysleep.info |
OP |
查看插件信息 |
onlysleep.reload |
OP |
重载配置 |
onlysleep.status |
OP |
查看状态 |
onlysleep.exempt |
None |
排除在睡眠机制之外(操作员默认参与睡眠) |
onlysleep.update |
OP |
更新提醒 |

你可以直接使用默认设置。主要设置在 config.yml 中的 sleep-percentage:
0 = 一名玩家入睡,全员苏醒
50 = 半数服务器玩家需要在床上
100 = 所有玩家必须入睡
如果希望跨所有世界进行全局计数,请设置 per-world-sleep: false。
有关所有选项,请参阅 config.yml;有关消息自定义,请参阅 messages.yml。


如果你安装了 PlaceholderAPI,以下占位符可用:
| 占位符 |
描述 |
%onlysleep_sleeping% |
玩家所在世界中正在睡觉的玩家数量 |
%onlysleep_required% |
跳过夜晚所需的玩家数量 |
%onlysleep_percentage% |
配置的睡眠百分比 |
%onlysleep_total% |
世界中符合条件的玩家总数 |
%onlysleep_progress% |
已实现的所需睡眠者百分比 (0-100) |
%onlysleep_progress_bar% |
可视化进度条 |
%onlysleep_sleeping_names% |
正在睡觉的玩家名称 |
%onlysleep_status% |
“Sleeping”(正在睡觉)或 “Awake”(清醒) |
%onlysleep_is_sleeping% |
true/false |
%onlysleep_is_night% |
如果是夜晚则为 true/false |
%onlysleep_is_sleepable% |
如果是夜晚或暴风雨天气则为 true/false |
%onlysleep_skipping% |
如果计划了跳过夜晚则为 true/false |
%onlysleep_enabled% |
如果世界中启用了睡眠功能则为 true/false |
%onlysleep_afk% |
如果玩家处于 AFK 状态则为 true/false |
%onlysleep_version% |
插件版本 |
%onlysleep_platform% |
服务器平台 (Folia/Paper/Spigot/Bukkit) |
%onlysleep_world_sleeping_<world>% |
特定世界中的睡眠计数 |
%onlysleep_world_required_<world>% |
特定世界中所需的计数 |
%onlysleep_world_total_<world>% |
特定世界中符合条件的总数 |
构建
git clone https://github.com/DemonZ-Development/Onlysleep.git
cd Onlysleep
./gradlew clean build
编译后的 JAR 文件位于 build/libs/ 中。
bStats
Onlysleep 使用 bStats 进行匿名使用指标统计。你可以在 plugins/bStats/config.yml 中选择退出。
链接
赞助方

Onlysleep
One player sleeps. Everyone wakes up.
Onlysleep lets your server skip the night without waiting for every player to find a bed. One sleeper is enough by default, but you can require any percentage from 0 to 100. Install the JAR, restart the server, and the default configuration is ready to use.

- One-player sleep by default, with configurable percentage thresholds
- Separate sleep counts for each world
- Independent controls for clearing rain and thunder
- Boss bar, action bar, title, and progress-bar feedback
- Configurable sounds for bed entry and successful night skips
- Built-in AFK tracking, plus EssentialsX and CMI support
- Filters for spectators, creative players, flying players, game modes, and exempt permissions
- Automatic handling of the
playersSleepingPercentage gamerule
- PlaceholderAPI support for sleep, world, and status data
- Optional update checks and anonymous bStats metrics


Requirements: Minecraft 26.3 and Java 25 or newer. Onlysleep works on its own; PlaceholderAPI is optional.


Aliases: /os, /sleep

| Permission |
Default |
Description |
onlysleep.* |
OP |
All permissions |
onlysleep.command |
Everyone |
Use commands |
onlysleep.info |
OP |
View plugin info |
onlysleep.reload |
OP |
Reload config |
onlysleep.status |
OP |
View status |
onlysleep.exempt |
None |
Excluded from sleep (operators sleep by default) |
onlysleep.update |
OP |
Update alerts |

You can use the defaults as-is. The main setting is sleep-percentage in config.yml:
0 = one player sleeps, everyone wakes up
50 = half the server needs to be in bed
100 = everyone has to sleep
Set per-world-sleep: false if you want global counting across all worlds.
See config.yml for every option and messages.yml for message customization.


If you have PlaceholderAPI installed, these placeholders are available:
| Placeholder |
Description |
%onlysleep_sleeping% |
Sleeping players in the player's world |
%onlysleep_required% |
Players needed to skip the night |
%onlysleep_percentage% |
Configured sleep percentage |
%onlysleep_total% |
Total eligible players in the world |
%onlysleep_progress% |
% of required sleepers achieved (0-100) |
%onlysleep_progress_bar% |
Visual progress bar |
%onlysleep_sleeping_names% |
Names of sleeping players |
%onlysleep_status% |
"Sleeping" or "Awake" |
%onlysleep_is_sleeping% |
true/false |
%onlysleep_is_night% |
true/false if it's night |
%onlysleep_is_sleepable% |
true/false if night/storm |
%onlysleep_skipping% |
true/false if a skip is scheduled |
%onlysleep_enabled% |
true/false if sleeping is enabled in the world |
%onlysleep_afk% |
true/false if the player is AFK |
%onlysleep_version% |
Plugin version |
%onlysleep_platform% |
Server platform (Folia/Paper/Spigot/Bukkit) |
%onlysleep_world_sleeping_<world>% |
Sleeping count in a specific world |
%onlysleep_world_required_<world>% |
Required count in a specific world |
%onlysleep_world_total_<world>% |
Total eligible in a specific world |
Building
git clone https://github.com/DemonZ-Development/Onlysleep.git
cd Onlysleep
./gradlew clean build
The compiled JAR is in build/libs/.
bStats
Onlysleep uses bStats for anonymous usage metrics. You can opt out in plugins/bStats/config.yml.
Links
Sponsored By
评论 0
登录后参与评分
还没有评论,来抢沙发吧