⚠️ 兼容性说明: 本插件基于 Minecraft 1.21.5 Purpur 构建。我在 Purpur 1.21.5 和 Spigot 1.21.1 上进行了测试。它应该可以在 1.21.1-1.21.5 的 Spigot/Purpur/Paper/Bukkit 上运行。
如果你想报告错误或建议新插件,请加入我的 Discord 服务器。
这是我从 SmpMechanics 插件中截取并改进的一个片段,它与 Cozy Campfire 和 CustomDayNightTime 共同构成了一个和谐的整体。
? BetterSleep
睡眠。做梦。生存。
BetterSleep 将无聊的原版睡眠机制转变为沉浸式、交互式的系统。时间不再瞬间跳过夜晚,而是平滑加速。睡觉会给玩家提供增益效果,而拒绝睡觉则会带来危险的后果。它具有高度可配置性,并针对生存多人服务器进行了优化。
✨ 主要特性
- ⏩ 平滑夜间加速: 夜晚不会直接“跳”到白天。时间会加速(例如 150 倍速),并通过全局 BossBar 显示进度。
- ✨ 奖励休息(增益): 睡觉的玩家将获得奖励!
- 授予可配置的药水效果(再生、速度等)。
- 净化: 醒来时移除所有有害效果(中毒、凋蚀、失明等)。
- ? 失眠惩罚(减益): 保持清醒的玩家会受到可配置的惩罚(例如缓慢、虚弱)。
- 智能逻辑: 创造模式或旁观者模式下的玩家会被自动忽略。
- 自然黎明: 即使没有人触发加速,如果夜晚自然过去,未睡觉的玩家仍会获得减益效果。
- ? 噩梦: 在低光照下睡觉(
light level < 7)有风险!你可能会被惊醒,并在房间里直接刷出僵尸或骷髅。
- ? 鲜活世界: 世界会对加速的时间做出反应!
- 作物生长更快。
- 动物成熟和重置繁殖冷却的速度更快。
- ❤️ 智能效果逻辑: 插件尊重你的游戏玩法。如果插件提供的药水效果比玩家现有的效果弱或持续时间短,插件绝不会覆盖玩家现有的药水效果。
- ? 安全协议: 在时间加速期间自动禁用 火焰蔓延,以防止因高刻速导致的意外大规模森林火灾。
- ?️ 实时管理员配置: 广泛的命令套件(
/bs add、/bs toggle 等)允许管理员在不重启服务器的情况下调整插件的各个方面。
⚙️ 配置
所有内容均可通过 config.yml 或游戏内命令进行自定义:
- 睡眠百分比: 需要多少玩家睡觉?(默认值:49.9% - 在 2 人服务器上单人即可触发)。
- 夜间速度: 夜晚应该多快过去?
- 模块: 独立切换增益、减益或噩梦功能。
? BetterSleep - 命令与权限
主命令: /bs(或 /bettersleep)
| 命令 |
描述 |
权限 |
默认 |
| --- 玩家 --- |
|
|
|
/bs |
显示服务器状态(速度、百分比、几率)。 |
bettersleep.help |
✅ 所有人 |
/bs help |
显示可用命令列表。 |
bettersleep.help |
✅ 所有人 |
/bs language <pl/en> |
更改个人界面语言。 |
bettersleep.language |
✅ 所有人 |
| --- 管理员 --- |
|
|
|
/bs sleeppercentage <%> |
设置所需的睡眠百分比。 |
bettersleep.percentage |
❌ OP |
/bs nightmultiplier <x> |
设置夜间速度乘数(例如 150)。 |
bettersleep.multiplier |
❌ OP |
/bs nightmarechance <%> |
设置黑暗中出现噩梦的几率。 |
bettersleep.nightmarechance |
❌ OP |
/bs toggle <module> |
切换:buff(增益)、debuff(减益)、nightmare(噩梦)。 |
bettersleep.toggle |
❌ OP |
/bs add <type> ... |
添加效果(buff/debuff)或生物。 |
bettersleep.add |
❌ OP |
/bs remove <type> ... |
从配置中移除效果或生物。 |
bettersleep.remove |
❌ OP |
/bs debug effect |
对自己测试应用效果(管理员)。 |
bettersleep.admin |
❌ OP |
/bs reload |
重新加载配置。 |
bettersleep.reload |
❌ OP |
特殊权限(绕过):
这些权限允许你将特定组(例如 VIP)排除在奖励或惩罚系统之外。
| 权限 |
描述 |
默认 |
bettersleep.bypass.buff |
玩家不会因为睡觉而获得奖励(增益)。 |
❌ 否 |
bettersleep.bypass.debuff |
玩家不会因为保持清醒而受到惩罚(减益)。 |
❌ 否 |
- 通配符权限:
bettersleep.*(授予完整的命令访问权限,但不自动授予绕过权限)。
? 安装
- 下载
.jar 文件。
- 将其放入服务器的
/plugins/ 文件夹中(Spigot/Paper/Purpur 1.21.x)。
- 重启服务器。
- (可选) 安装 CustomDayNightTime 以自定义白昼长度!
⚠️ Compatibility Note: This plugin is built for Minecraft 1.21.5 Purpur. I tested it on Purpur 1.21.5 and Spigot 1.21.1. It should work on 1.21.1-1.21.5 Spigot/Purpur/Paper/Bukkit.
If you want to report a bug or suggest a new plugin, join my Discord server.
This is a cut-out and improved fragment of my SmpMechanics plugin and forms a harmonious whole with Cozy Campfire and CustomDayNightTime.
? BetterSleep
Sleep. Dream. Survive.
BetterSleep transforms the boring vanilla sleep mechanic into an immersive, interactive system. Instead of skipping the night instantly, time accelerates smoothly. Sleeping rewards players with buffs, while refusing to sleep brings dangerous consequences. It’s highly configurable and optimized for survival multiplayer servers.
✨ Key Features
- ⏩ Smooth Night Acceleration: The night doesn't just "snap" to day. Time accelerates (e.g., 150x speed) with a global BossBar showing progress.
- ✨ Rewarding Rest (Buffs): Players who sleep are rewarded!
- Grants configurable potion effects (Regeneration, Speed, etc.).
- Cleansing: Waking up removes all harmful effects (Poison, Wither, Blindness, etc.).
- ? Insomnia Penalties (Debuffs): Players who stay awake receive configurable punishments (e.g., Slowness, Weakness).
- Smart Logic: Players in Creative or Spectator modes are automatically ignored.
- Natural Dawn: Even if no one triggers the speed-up, if the night passes naturally, debuffs are still applied to those who didn't sleep.
- ? Nightmares: Sleeping in low light (
light level < 7) carries a risk! You might wake up violently with a Zombie or Skeleton spawning directly in your room.
- ? Living World: The world reacts to the accelerated time!
- Crops grow faster.
- Animals mature and reset breeding cooldowns faster.
- ❤️ Intelligent Effect Logic: The plugin respects your gameplay. It will never overwrite a player's existing potion effect if it is stronger or lasts longer than the one provided by the plugin.
- ? Safety Protocols: Automatically disables Fire Spread during the time acceleration to prevent accidental massive forest fires due to high tick speeds.
- ?️ Live Admin Config: extensive command suite (
/bs add, /bs toggle, etc.) allows admins to tweak every aspect of the plugin without restarting.
⚙️ Configuration
Everything is customizable via config.yml or in-game commands:
- Sleep Percentage: How many players need to sleep? (Default: 49.9% - single player triggers it on 2-player server).
- Night Speed: How fast should the night pass?
- Modules: Toggle Buffs, Debuffs, or Nightmares independently.
? BetterSleep - Commands & Permissions
Main command: /bs (or /bettersleep)
| Command |
Description |
Permission |
Default |
| --- PLAYER --- |
|
|
|
/bs |
Displays server status (Speed, %, Chances). |
bettersleep.help |
✅ Everyone |
/bs help |
Displays the list of available commands. |
bettersleep.help |
✅ Everyone |
/bs language <pl/en> |
Change your personal interface language. |
bettersleep.language |
✅ Everyone |
| --- ADMIN --- |
|
|
|
/bs sleeppercentage <%> |
Set required sleep percentage. |
bettersleep.percentage |
❌ OP |
/bs nightmultiplier <x> |
Set night speed multiplier (e.g. 150). |
bettersleep.multiplier |
❌ OP |
/bs nightmarechance <%> |
Set chance for a nightmare in dark. |
bettersleep.nightmarechance |
❌ OP |
/bs toggle <module> |
Toggle: buff, debuff, nightmare. |
bettersleep.toggle |
❌ OP |
/bs add <type> ... |
Add an effect (buff/debuff) or mob. |
bettersleep.add |
❌ OP |
/bs remove <type> ... |
Remove an effect or mob from config. |
bettersleep.remove |
❌ OP |
/bs debug effect |
Test apply effects on yourself (admin). |
bettersleep.admin |
❌ OP |
/bs reload |
Reloads configuration. |
bettersleep.reload |
❌ OP |
Special Permissions (Bypass):
These permissions allow you to exclude specific groups (e.g., VIPs) from the reward or penalty system.
| Permission |
Description |
Default |
bettersleep.bypass.buff |
Player will not receive rewards (buffs) for sleeping. |
❌ False |
bettersleep.bypass.debuff |
Player will not receive penalties (debuffs) for staying awake. |
❌ False |
- Wildcard Permission:
bettersleep.* (Grants full command access, but does NOT automatically grant bypass permissions).
? Installation
- Download the
.jar file.
- Place it in the
/plugins/ folder of your server (Spigot/Paper/Purpur 1.21.x).
- Restart the server.
- (Optional) Install CustomDayNightTime for custom day lengths!
评论 0
登录后参与评分
还没有评论,来抢沙发吧