Sleep Vote
投票跳过夜晚。
Sleep Vote 将原版的睡眠机制替换为社区投票系统。不再需要多数玩家物理上在床上睡觉,任何人都可以发起投票,让服务器民主决定是否跳过夜晚。
工作原理
当玩家在夜间右键点击床时,会自动启动全服投票。所有玩家有 15 秒(可配置)的时间进行投票。如果至少一半的服务器玩家投了赞成票,夜晚将立即跳过。
命令
| 命令 |
描述 |
/sleep yes |
投票跳过夜晚 |
/sleep no |
保留夜晚 |
/sleep reload |
无需重启即可重载配置(仅限管理员) |
投票规则
- 当玩家在夜间与床交互时,会自动触发投票
- 每位玩家在每个投票周期内只能投票一次
- 如果赞成票多于反对票,且至少有半数在线玩家投了赞成票(可配置),则投票通过
- 如果投票失败,夜晚将继续正常进行
配置
配置文件会在服务器首次启动时自动生成:
- Fabric:
config/sleep-vote.json
- Paper / Purpur:
plugins/SleepVote/config.yml
| 设置项 |
默认值 |
描述 |
passPercentage |
50 |
必须投赞成票的在线玩家百分比(0–100) |
minYesVotes |
1 |
无论玩家数量多少,所需的最少赞成票数 |
voteDurationSeconds |
15 |
投票开放时长,单位为秒 |
编辑后,运行 /sleep reload 或重启服务器即可生效。
在 Fabric 1.21.11 版本中不提供此配置选项。
兼容性
- Fabric: 1.21.11 以及 26.1 – 26.3
- Paper / Purpur: 1.21 – 26.3
- 依赖: Fabric API(仅限 Fabric 版本)。Paper 版本无需其他依赖。
Sleep Vote
Vote to skip the night.
Sleep Vote replaces the vanilla sleep mechanic with a community vote system. Instead of needing a majority of players to physically sleep in beds, anyone can trigger a vote and let the server decide democratically whether to skip the night.
How It Works
When a player right-clicks a bed during the night, a server-wide vote is automatically started. All players have 15 seconds (configurable) to cast their vote. If at least half of the server votes yes, the night is skipped instantly.
Commands
| Command |
Description |
/sleep yes |
Vote to skip the night |
/sleep no |
Vote to keep the night |
/sleep reload |
Reload the config without restarting (operators only) |
Vote Rules
- A vote is triggered automatically when a player interacts with a bed at night
- Players can only vote once per vote
- The vote passes if there are more yes than no votes and at least half of all online players voted yes (configurable)
- If the vote fails, the night continues as normal
Config
The config file is created automatically the first time the server starts:
- Fabric:
config/sleep-vote.json
- Paper / Purpur:
plugins/SleepVote/config.yml
| Setting |
Default |
Description |
passPercentage |
50 |
Percentage (0–100) of online players that must vote yes |
minYesVotes |
1 |
Minimum number of yes votes, regardless of player count |
voteDurationSeconds |
15 |
How long a vote stays open, in seconds |
After editing, run /sleep reload or restart the server.
The config is not available in the Fabric 1.21.11 version.
Compatibility
- Fabric: 1.21.11 and 26.1 – 26.3
- Paper / Purpur: 1.21 – 26.3
- Required: Fabric API (Fabric version only). The Paper version needs nothing else.
评论 0
登录后参与评分
还没有评论,来抢沙发吧