ServerSleep
一款轻量级、高兼容性的 Bukkit/Spigot/Paper 插件,允许你控制需要多少玩家睡觉才能跳过夜晚——且不会破坏白天计数或幻翼计时器。
与许多使用 setTime(0) 并重置世界天数(影响统计数据和幻翼生成等)的跳夜插件不同,ServerSleep 使用正确的绝对时间方法(setFullTime)来正确地推进到次日清晨,就像原版睡眠机制一样。
对于运行旧版本(1.17 之前)的服务器来说非常完美,因为内置的 playersSleepingPercentage 游戏规则要么不存在,要么行为不一致。
功能
- 可配置的睡眠百分比:
100 = 原版行为(所有玩家都必须睡觉)
50 = 只需要一半的玩家
0 = 单个玩家即可跳过夜晚
- 不会重置天数 —— 保留世界统计数据和幻翼生成计时器。
- 自动重置睡觉玩家的幻翼计时器。
- 跳过夜晚后清除天气(暴雨/雷暴)。
- 完全尊重游戏规则
doDaylightCycle 和 doWeatherCycle。
- 仅支持主世界(下界/末地不受影响)。
命令 (OP / serversleep.command 权限)
/serversleep — 显示当前睡眠百分比。
/serversleep percent <0-100> — 更改所需的睡眠百分比并保存到配置文件中。
/serversleep reload — 重新加载配置文件。
配置
该插件使用 plugins/ServerSleep/config.yml
# 跳过夜晚所需处于非旁观模式且正在睡觉的玩家百分比。
# 范围:0-100(0 = 一名玩家,100 = 所有玩家)
sleep-percentage: 100
# 当夜晚被跳过时向全服广播的消息。支持 & 颜色代码。
# 留空("")则不发送任何消息。
skip-message: "&6夜晚已跳过!早上好。"
# 在跳过夜晚时清除雨/雷暴(仅在 doWeatherCycle 开启时生效)。
clear-weather: true
# 在跳过夜晚时重置每个睡觉玩家的幻翼计时器(1.13+)。
reset-phantoms: true
ServerSleep
A lightweight, highly compatible Bukkit/Spigot/Paper plugin that lets you control how many players must sleep to skip the night — without breaking the day counter or phantom timers.
Unlike many night-skip plugins that use setTime(0) and reset the world day count (affecting statistics, phantoms, and more), ServerSleep uses the correct absolute time method (setFullTime) to advance properly to the next morning, just like vanilla sleeping.
Perfect for servers running older versions (pre-1.17) where the built-in playersSleepingPercentage gamerule doesn't exist or behaves inconsistently.
Features
- Configurable sleep percentage:
100 = Vanilla behavior (all players must sleep)
50 = Half the players needed
0 = A single player can skip the night
- Does NOT reset the day count — preserves world statistics and phantom spawning timers.
- Automatically resets phantom timers for players who sleep.
- Clears weather (storm/thunder) after skipping night.
- Fully respects the gamerules
doDaylightCycle and doWeatherCycle.
- Supports Overworld only (Nether/End unaffected).
Commands (OP / serversleep.command permission)
/serversleep — Show current sleep percentage.
/serversleep percent <0-100> — Change the required sleep percentage and save to config.
/serversleep reload — Reload the configuration file.
Configuration
The plugin uses plugins/ServerSleep/config.yml
# Percentage of non-spectator players required to be sleeping to skip the night.
# Range: 0-100 (0 = one player, 100 = all players)
sleep-percentage: 100
# Message broadcast to the world when night is skipped. Supports & color codes.
# Leave empty ("") to send no message.
skip-message: "&6Night has been skipped! Good morning."
# Clear rain/thunder when night is skipped (only fires if doWeatherCycle is on).
clear-weather: true
# Reset each sleeping player's phantom timer when night is skipped (1.13+).
reset-phantoms: true
评论 0
登录后参与评分
还没有评论,来抢沙发吧