← Назад к ресурсам

Sleep Poll

SleepPoll(sleep vote) is a Minecraft Fabric mod that introduces a voting system for skipping the night. When a player enters a bed, a poll is created, allowing all online players to vote on whether to skip the night or keep it.

Modrinth game-mechanics utility

Описание

# 📘 SleepPoll — Fabric Mod (Minecraft 1.21.11) *A lightweight, server-side voting system for skipping the night in multiplayer.* --- ## Description **SleepPoll** is a server-side Fabric mod that replaces vanilla night skipping with a **fair voting system**. When a player enters a bed, the mod automatically creates a poll. All online players can vote **YES** or **NO** using clickable chat buttons. The night is skipped only if the **combined support** of: - Sleeping players - Players who vote YES - AFK Players / Players that didn't vote will automatically vote yes at the end of the poll meets or exceeds the percentage defined by the `playersSleepingPercentage` gamerule`. SleepPoll also prevents vanilla from skipping the night prematurely and uses a **smooth 10-second transition** instead. Perfect for multiplayer servers that want fairness and community-driven control over the night cycle. --- ## Features ### ✔ Night Skip Voting System - A poll automatically begins when a player enters a bed. - All players can vote via commands or clickable messages. - Sleeping players count automatically as YES supporters. ### ✔ Clickable Voting UI Players receive interactive chat buttons: [Vote YES] [Vote NO] ### ✔ Bossbar Progress Indicator Shows: - Supporters required vs. actual supporters - A 30-second countdown timer - A “Skipping Night…” animation after success ![Skip night bossbar](https://cdn.modrinth.com/data/cached_images/fa011a1ca06139f2a8b0f22d07da88a463602eec.png) ### ✔ Based on PlayerSleepingPercentage Gamerule - Fully respects your configured sleep percentage. - Vanilla sleeping is disabled during a poll (restored afterward). ### ✔ Smooth Night Skipping Instead of instantly jumping to day: - Time advances over **10 seconds** - A bossbar shows real-time skip progress ![Skipping Night Progress](https://cdn.modrinth.com/data/cached_images/dd5e369798c22b965de4d8b27f87af1379c30930.png) ### ✔ Automatic Insomnia Reset YES voters get their **phantom insomnia** reset when the night is skipped by vote. ### ✔ Server-Friendly - Server-side only (no client mod needed) - Works with any number of players - Compatible with most other mods --- ## 📸 Screenshots ### 1. Voting Buttons in Chat ![Voting Buttons](https://cdn.modrinth.com/data/cached_images/b7fb8bf56f8d9d7a8b191f486a3813a9833b8f47.png) ### 2. Poll Progress Bossbar (Example 1 / 2) ![Vote bossbar](https://cdn.modrinth.com/data/cached_images/fa011a1ca06139f2a8b0f22d07da88a463602eec.png) ### 3. Poll Completion / Night-Skipped Message ![Vote completed](https://cdn.modrinth.com/data/cached_images/ec4da722e935626a780259bcfb2ca205d666ecbb.png) ### 4. Night Skipping Animation ![Progress bossbar](https://cdn.modrinth.com/data/cached_images/dd5e369798c22b965de4d8b27f87af1379c30930.png) --- ## Commands | Command | Description | |---------------|-------------| | `/vote yes` | Casts a YES vote | | `/vote no` | Casts a NO vote | Voting is also available through clickable chat buttons. --- ## Gamerule Support | Gamerule | Description | |------------------------------|-------------| | `playersSleepingPercentage` | Percentage required to skip the night | Example: ```mcfunction /gamerule playersSleepingPercentage 60