
SleepMenu
SleepMenu 是一款面向 Minecraft 的服务端 Fabric 模组。
站在床上的玩家会获得一个可点击的聊天菜单,用于更改时间和天气。
站在床上,点击你的选择,塑造天空:白天、夜晚、晴朗、下雨或雷暴。
? 命令
/sleepmenu open
/sleepmenu set <option>
/sleepmenu reload(仅限管理员;允许在控制台使用)
选项:
day(白天)、midnight(午夜)、night(夜晚)、noon(正午)、clear(晴朗)、rain(下雨)和 thunder(雷暴)
如果客户端安装了 Mod Menu 和 Cloth Config,也可以通过游戏内的配置界面编辑配置。专用服务器不需要这些依赖项。
? 服务端
本模组完全在服务端运行。客户端无需安装该模组。
也适用于单人游戏(不支持 LuckPerms)。
? LuckPerms 权限
如果安装了 LuckPerms,将检查以下节点:
sleepmenu.use
sleepmenu.time.day
sleepmenu.time.midnight
sleepmenu.time.night
sleepmenu.time.noon
sleepmenu.weather.clear
sleepmenu.weather.rain
sleepmenu.weather.thunder
如果缺少 LuckPerms,回退行为由配置文件控制。
? LuckPerms 快速入门
示例:允许所有人打开睡眠菜单,但仅允许管理员更改天气。
/lp group default permission set sleepmenu.use true
/lp group moderator permission set sleepmenu.weather.clear true
/lp group moderator permission set sleepmenu.weather.rain true
/lp group moderator permission set sleepmenu.weather.thunder true
官方 LuckPerms 文档:
⚙️ 配置
配置文件:config/sleepmenu.json
{
"cooldownTicks": 400,
"antiSpamWindowTicks": 12000,
"timeChangeLimit": 4,
"weatherChangeLimit": 4,
"allowStrawBed": false,
"destroyStrawBedOnUse": false,
"noLuckPermsAccess": "EVERYONE"
}
cooldownTicks: 每位玩家成功变更之间的最小间隔刻数(20 刻 = 1 秒)。
antiSpamWindowTicks: 所有玩家成功变更共享的反垃圾窗口期。默认 12000 刻 = 10 分钟。
timeChangeLimit: 在反垃圾窗口期内允许的最大成功时间变更次数。设为 0 以禁用。
weatherChangeLimit: 在反垃圾窗口期内允许的最大成功天气变更次数。设为 0 以禁用。
allowStrawBed: 允许站在已放置的草席床上时使用 SleepMenu。默认 false。
destroyStrawBedOnUse: 在成功进行时间或天气变更后消耗草席床,且不掉落物品。仅在 allowStrawBed 为 true 时生效;普通床不受影响。默认 false。
noLuckPermsAccess: EVERYONE(所有人)或 OP_ONLY(仅管理员)。
草席床
将 allowStrawBed 设置为 true,放置一张草席床并站在上面,即可使用与普通床相同的菜单。使用 SleepMenu 不会改变你现有的重生点。同样的权限、冷却时间和反垃圾限制均适用。
若希望可重复使用,请保持 destroyStrawBedOnUse 为 false;若希望单次使用后销毁,请将两个选项都设为 true。打开菜单或尝试执行被阻止的操作不会消耗草席床。此选项仅控制 SleepMenu 的行为;正常睡眠仍保留原版行为。
? 安装
- 下载最新 JAR 文件。
- 将 JAR 文件放入服务器的
mods/ 文件夹中。
- 确保也已安装 Fabric API。
- 启动 Minecraft —— 配置文件将自动创建。
?️ 测试服务器
欢迎加入我的 Minecraft 服务器来测试我的模组:play.swordfishbe.eu
⁉️ 致谢/创意来源
基于 TOLoneWolf 为 Hypermine SMP 创建的睡眠菜单系统命令方块设置

SleepMenu
SleepMenu is a server-side Fabric mod for Minecraft.
Players standing on a bed get a clickable chat menu to change time and weather.
Stand on a bed, click your choice, and shape the sky: day, night, clear, rain, or thunder.
? Commands
/sleepmenu open
/sleepmenu set <option>
/sleepmenu reload (admin only; console allowed)
Options:
day, midnight, night, noon, clear, rain and thunder
If Mod Menu and Cloth Config are installed on the client, the config can also be edited through an in-game config screen. Dedicated servers do not need either dependency.
? Server-side
This mod runs fully server-side. Clients do not need to install the mod.
Also works in single-player (without LuckPerms support).
? LuckPerms permissions
If LuckPerms is installed, these nodes are checked:
sleepmenu.use
sleepmenu.time.day
sleepmenu.time.midnight
sleepmenu.time.night
sleepmenu.time.noon
sleepmenu.weather.clear
sleepmenu.weather.rain
sleepmenu.weather.thunder
If LuckPerms is missing, fallback behavior is controlled by config.
? LuckPerms quick start
Example: allow everyone to open the Sleep Menu, but only moderators to change weather.
/lp group default permission set sleepmenu.use true
/lp group moderator permission set sleepmenu.weather.clear true
/lp group moderator permission set sleepmenu.weather.rain true
/lp group moderator permission set sleepmenu.weather.thunder true
Official LuckPerms docs:
⚙️ Configuration
Config file: config/sleepmenu.json
{
"cooldownTicks": 400,
"antiSpamWindowTicks": 12000,
"timeChangeLimit": 4,
"weatherChangeLimit": 4,
"allowStrawBed": false,
"destroyStrawBedOnUse": false,
"noLuckPermsAccess": "EVERYONE"
}
cooldownTicks: minimum ticks between successful changes per player (20 ticks = 1 second).
antiSpamWindowTicks: shared anti-spam window for successful changes across all players. Default 12000 ticks = 10 minutes.
timeChangeLimit: maximum successful time changes allowed inside the anti-spam window. Set 0 to disable.
weatherChangeLimit: maximum successful weather changes allowed inside the anti-spam window. Set 0 to disable.
allowStrawBed: allow SleepMenu while standing on a placed straw bed. Default false.
destroyStrawBedOnUse: consume the straw bed without dropping an item after a successful time or weather change. Only applies when allowStrawBed is true; regular beds are unaffected. Default false.
noLuckPermsAccess: EVERYONE or OP_ONLY.
Straw beds
Set allowStrawBed to true, place a straw bed, and stand on it to use the same menu as a regular bed. Using SleepMenu does not change your existing respawn point. The same permissions, cooldown, and anti-spam limits apply.
Leave destroyStrawBedOnUse set to false for reusable access, or set both options to true for single-use access. Opening the menu or attempting a blocked action does not consume the straw bed. This option controls SleepMenu actions only; normal sleeping keeps its vanilla behavior.
? Installation
- Download the latest JAR.
- Place the JAR in your server's
mods/ folder.
- Make sure Fabric API is also installed.
- Start Minecraft — the config file will be created automatically.
?️ Test Server
Feel free to join my Minecraft server to test my mods: play.swordfishbe.eu
⁉️ Credits/Idea
Based on the command blocks setup created by TOLoneWolf's: Sleep Menu System for Hypermine SMP
评论 0
登录后参与评分
还没有评论,来抢沙发吧