A modern sleep voting system for Paper servers that transforms night-time gameplay with democratic polling.
SleepPolls
A modern sleep voting system for Paper servers that transforms night-time gameplay with democratic polling.
SleepPolls
Modern sleep voting for Paper servers.
๐ฏ Overview
SleepPolls is a sophisticated Minecraft plugin that revolutionizes how servers handle sleep mechanics. Instead of a single player automatically skipping the night for everyone, SleepPolls initiates a real-time democratic vote. Players receive beautiful interactive vote buttons, live countdown displays, and instant feedbackโall while maintaining server performance and customization options.
Perfect for survival servers, SMPs, and communities that value collaborative decision-making.
โจ Features
- ๐ Sleep Voting System โ When a player enters a bed during night, an instant poll launches to determine if the night should be skipped
- ๐ฑ๏ธ Clickable Vote Buttons โ Interactive YES/NO buttons with hover previews using Adventure API components
- ๐ BossBar Display โ Real-time countdown timer with vote progress tracking (toggleable per player)
- ๐ฌ ActionBar Updates โ Live vote count and remaining time displayed above the hotbar
- ๐ Audio Feedback โ Customizable sound effects for poll start and countdown completion
- โฐ Configurable Duration โ Adjust poll length from 15 to 60+ seconds based on server size
- ๐ Flexible Vote Requirements โ Set the percentage needed (50-100%) for night skip approval
- ๐ด AFK Detection โ Seamless EssentialsX integration to exclude AFK players from polls
- ๐ World Blacklist โ Disable polls in specific worlds (lobbies, minigames, creative)
- โก Minimum Player Validation โ Polls require at least 2 active players to initiate
- ๐ง๏ธ Weather Control โ Optional auto-clearing of rain and thunder on successful skip
- โ๏ธ Production-Ready Configuration โ Extensive YAML config with sensible defaults
- โ Permission System โ Fine-grained control over who can reload config or toggle bossbars
๐ฆ Installation
Prerequisites
- Server Software: Paper 26.1.2 or later
- Java Version: Java 25 or later
- Minecraft Version: 26.1+
- Optional Dependency: EssentialsX (for AFK detection)
Installation Steps
Download the plugin
- Download the latest
SleepPolls-*.jarfrom Here
- Download the latest
Place the plugin in your plugin folder
Start or restart your server
Verify installation
/sp version # Output: Running SleepPolls 1.0.0Configure
- Edit
plugins/SleepPolls/config.ymlto customize behavior - Reload with
/sp reloadwithout restarting
- Edit
๐ฎ Commands
| Command | Aliases | Description | Permission |
|---|---|---|---|
/sleeppoll help |
/sp help |
Display the help menu | None |
/sleeppoll version |
/sp version |
Show plugin version | None |
/sleeppoll status |
/sp status |
View current poll information (world-specific) | None |
/sleeppoll yes |
/sp yes |
Vote YES to skip the night | None |
/sleeppoll no |
/sp no |
Vote NO to keep the night | None |
/sleeppoll bossbar |
/sp bossbar |
Toggle personal BossBar notifications | sleeppolls.bossbar |
/sleeppoll reload |
/sp reload |
Reload configuration from disk | sleeppolls.reload |
๐ Permissions
| Permission | Default | Description |
|---|---|---|
sleeppolls.reload |
Op only | Allows use of /sp reload command |
sleeppolls.bossbar |
Everyone | Allows toggling BossBar notifications per-player |
Note: Voting commands (
yes,no,status,version,help) are available to all players without special permissions.
โ๏ธ Configuration
The plugin uses a single YAML configuration file located at plugins/SleepPolls/config.yml. Edit this file and run /sp reload to apply changes without restarting.
Poll Settings
# Duration of a sleep poll in seconds.
#
# Recommended values:
# 15 = Fast-paced servers, quick decision-making
# 20 = Balanced (default, recommended)
# 30+ = Large SMPs, slower decision-making
poll-duration-seconds: 20
# Percentage of YES votes required to skip the night.
#
# Examples:
# 50 = Simple majority (half + 1)
# 60 = Moderate consensus
# 75 = Strong consensus required
required-percentage: 50
BossBar Settings
bossbar:
# Enables the BossBar countdown display.
# Shows remaining time, required votes, and current YES votes.
# Players can disable this individually with /sp bossbar
enabled: true
Sound Settings
sounds:
# Enables all plugin sounds.
# Includes poll start alert and countdown completion.
# Players with sound disabled in-game won't hear these.
enabled: true
Weather Settings
weather:
# Automatically clear rain after a successful poll
clear-rain: true
# Automatically clear thunder after a successful poll
clear-thunder: true
World Settings
worlds:
# List of worlds where sleep polls are COMPLETELY DISABLED.
# Entering a bed in these worlds will not trigger a poll.
#
# Common examples:
# - lobby (prevents poll spam in hub areas)
# - spawn (keeps spawn peaceful)
# - minigames (prevents polls during activities)
blacklist:
- lobby
- minigames
Example Configurations
Fast-Paced PvP Server (emphasizes quick decisions)
poll-duration-seconds: 15
required-percentage: 50 # Simple majority
bossbar:
enabled: true
sounds:
enabled: true
Large Community SMP (emphasizes consensus)
poll-duration-seconds: 30
required-percentage: 65 # Stronger consensus
bossbar:
enabled: true
sounds:
enabled: true
๐ How It Works
The Polling Flow
- Initiation: A player attempts to enter a bed during night time (13000โ23000 game ticks)
- Eligibility Check: Server calculates active voters:
- Online players in the same world
- Non-AFK players (EssentialsX integration)
- Non-spectator mode
- Alive players
- Minimum 2 players required
- Vote Notification: All eligible voters receive:
- Chat message with clickable [โ YES] and [โ NO] buttons
- BossBar countdown timer (if enabled)
- Sound alert (if enabled)
- Voting Window: Players vote using
/sp yesor/sp no(or click buttons) - Real-Time Display: ActionBar shows live vote count and remaining seconds
- Result Resolution:
- SUCCESS: YES votes reach required percentage โ Night skipped, weather cleared, success message
- FAILURE: Time expires or NO votes prevent majority โ Night continues, failure message
- DUPLICATE: Poll already active in world โ User receives "poll in progress" message
Vote Calculation
The plugin calculates required votes dynamically:
votes_needed = ceil(total_eligible_players ร (required_percentage รท 100))
Example with 8 players and 50% requirement:
votes_needed = ceil(8 ร 0.50) = 4- At least 4 YES votes needed out of 8 eligible voters
AFK Handling
If EssentialsX is installed, SleepPolls automatically:
- Detects AFK players using EssentialsX API
- Excludes AFK players from the eligible voter pool
- Does NOT count their vote slots toward requirements
If EssentialsX is not installed, all online players are considered active.
Cooldown & Minimum Players
- No hard cooldown between polls, but each poll must finish naturally
- Minimum 2 active players required to start a poll
- One poll per world at a time (attempting to sleep during active poll cancels bed entry)
๐ ๏ธ Technical Details
Architecture
- Framework: Built on the modern Paper Bootstrapper system for optimal performance
- Command Framework: Lamp 4.0.0-rc.12 for flexible, maintainable command routing
- Text Components: Adventure API for rich, interactive chat elements with click events
- Integration: Native Paper API + optional EssentialsX hooking
- Packaging: Shadow Jar with relocated Lamp library to prevent conflicts
Build System
- Build Tool: Gradle with Kotlin DSL
- Compilation: Java 25 target with
-parametersflag for preserved method names - Output: SleepPolls-1.0.0.jar (all-in-one, plugin-ready)
Dependencies
| Dependency | Version | Scope | Purpose |
|---|---|---|---|
| Paper API | 26.1.2 | Compile | Server API and Bootstrap system |
| Lamp | 4.0.0-rc.12 | Shade | Command routing framework |
| EssentialsX | 2.21.1 | Optional | AFK player detection |
| Gson | 2.13.1 | Paper-provided | JSON configuration loading |
๐บ๏ธ Roadmap
- Multi-World Vote Averaging โ Aggregate votes across linked worlds
- Vote Streaks & Achievements โ Track player voting patterns and unlockable badges
- Custom Vote Messages โ Configurable titles, formats, and colors in messages
- Statistics Dashboard โ
/sp statscommand showing historical poll data - PlaceholderAPI Integration โ Placeholders for leaderboards and info displays
- Alternative Vote Methods โ Inventory GUIs or sign interactions for voting
- Economy Integration โ Optional voting costs/rewards for relevant plugins
- Time Skip Customization โ Configure exactly how many ticks to skip on success
๐ค Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit changes with clear messages
- Push to your fork (
git push origin feature/your-feature) - Open a Pull Request with a description of changes
Development Setup
# Clone the repository
git clone https://github.com/Amethyst-Developers/Sleep-Polls.git
cd Sleep-Polls
# Build the plugin
./gradlew build
# Run the test server
./gradlew runServer
# Output JAR location
# build/libs/SleepPolls-1.0.0.jar
Code Style
- Follow standard Java naming conventions
- Use 4-space indentation
- Preserve Adventure API component builders for readability
- Add comments for complex game logic
๐ License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0-or-later).
๐ Legal Resources:
๐ Support & Community
- Issues: Report bugs or suggest features on GitHub Issues
- Documentation: Full config guide included in
config.yml - Questions: Ask in plugin comments or community forums
๐ฅ Credits
SleepPolls is developed and maintained by Amethyst Developers.
Built with:
- Paper โ Best-in-class Minecraft server software
- Adventure โ Modern text components
- Lamp โ Powerful command framework
Information
| Category | Gameplay |
|---|---|
| Published on | May 29, 2026 |
| License | GPL |
| Downloads | 2 |
| Stars | 1 |
| Watchers | 0 |