Skip to content

Amethyst-Developers/Sleep-Polls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ™ SleepPolls

SleepPolls Logo

SleepPolls

Modern sleep voting for Paper servers.


๐Ÿš€ Why SleepPolls?

Most sleep voting plugins stop at basic vote counting.

SleepPolls provides a modern, production-ready sleep voting experience with interactive chat components, live vote tracking, persistent statistics, leaderboards, database support, and AFK-aware voting.

โœจ Highlights

  • ๐ŸŒ™ Interactive sleep voting
  • ๐Ÿ“Š Live BossBar progress tracking
  • ๐Ÿ’ฌ ActionBar countdown updates
  • ๐Ÿ–ฑ๏ธ Clickable YES / NO vote buttons
  • ๐Ÿ˜ด EssentialsX AFK detection
  • ๐Ÿ† Statistics & leaderboards
  • ๐Ÿ’พ SQLite & MariaDB support
  • ๐ŸŒ World blacklist support
  • ๐Ÿ”Š Optional sound effects
  • โšก Async database operations
  • ๐Ÿš€ HikariCP connection pooling
  • ๐Ÿ”“ Open source

๐ŸŽฏ Overview

When a player enters a bed during the night, SleepPolls automatically creates a vote.

Eligible players can vote using clickable chat buttons or commands.

If enough YES votes are received before the timer expires, the night is skipped.

Unlike traditional sleep plugins, SleepPolls only counts active eligible players, creating a much fairer experience for SMPs and community servers.


โœจ Features

๐ŸŒ™ Sleep Voting

  • Automatic sleep vote creation
  • Configurable vote duration
  • Configurable vote requirements
  • One active poll per world
  • Real-time vote tracking

๐Ÿ–ฑ๏ธ Interactive Voting

Players receive clickable buttons directly in chat:

โœ” YES    โœ– NO

No GUI required.


๐Ÿ“Š BossBar Tracking

Optional BossBar showing:

  • Remaining time
  • Current YES votes
  • Required votes

Players can disable it individually:

/sp bossbar

๐Ÿ’ฌ ActionBar Updates

Live updates every second:

๐ŸŒ™ Sleep Poll โ€ข YES 2/3 โ€ข 12s

๐Ÿ˜ด AFK Detection

If EssentialsX is installed:

  • AFK players are excluded
  • Only active players count toward vote requirements

This prevents inactive players from blocking night skips.


๐Ÿ“ˆ Statistics System

SleepPolls tracks:

  • Total Votes
  • Successful Votes
  • Failed Votes
  • Polls Started
  • Nights Skipped

View your statistics:

/sp stats

๐Ÿ† Leaderboards

View the most active sleepers:

/sp top

Perfect for competitive SMP communities.


๐ŸŒง๏ธ Weather Control

After a successful vote:

  • Rain can be cleared
  • Thunder can be cleared

Fully configurable.


๐ŸŒ World Blacklist

Disable sleep voting in specific worlds.

Example:

worlds:
  blacklist:
    - lobby
    - minigames

๐Ÿ“ฆ Installation

Requirements

  • Paper
  • Java 25+
  • Minecraft 26.1+

Optional:

  • EssentialsX (AFK detection)

Installation

  1. Download the latest release.
  2. Place the jar in your plugins folder.
  3. Start the server.
  4. Configure config.yml.
  5. Run:
/sp reload

or restart the server.


๐ŸŽฎ Commands

Command Description
/sp help Display help menu
/sp version Show plugin version
/sp status View current poll
/sp yes Vote YES
/sp no Vote NO
/sp stats View personal statistics
/sp top View leaderboard
/sp bossbar Toggle BossBar
/sp reload Reload configuration

Aliases:

/sp
/sleeppoll

๐Ÿ” Permissions

Permission Description
sleeppolls.reload Allows configuration reload
sleeppolls.bossbar Allows BossBar toggling

All voting commands are available to regular players.


โš™๏ธ Configuration

Poll Settings

poll-duration-seconds: 20
required-percentage: 50

Example:

  • 2 eligible players โ†’ 1 YES required
  • 3 eligible players โ†’ 2 YES required
  • 5 eligible players โ†’ 3 YES required

BossBar

bossbar:
  enabled: true

Sounds

sounds:
  enabled: true

Weather

weather:
  clear-rain: true
  clear-thunder: true

Database

SQLite

database:
  type: SQLITE

MariaDB

database:
  type: MARIADB

  mariadb:
    host: localhost
    port: 3306
    database: sleeppolls
    username: root
    password: password
    pool-size: 5

๐Ÿ”„ How It Works

  1. Player enters a bed.
  2. SleepPolls calculates eligible voters.
  3. Vote starts.
  4. Players vote YES or NO.
  5. Live BossBar and ActionBar updates are shown.
  6. Poll succeeds or fails.
  7. Statistics are updated and stored.

๐Ÿ› ๏ธ Technical Details

Built using:

  • Java 25+
  • Paper API
  • Adventure API
  • Lamp Command Framework
  • HikariCP
  • SQLite
  • MariaDB

Design Goals

  • Lightweight
  • Async-first
  • Modern Paper APIs
  • No ProtocolLib dependency
  • No NMS
  • Production ready

๐Ÿ—บ๏ธ Roadmap

  • Velocity network-wide sleep voting
  • PlaceholderAPI support
  • Localization support
  • Customizable messages
  • GUI voting interface
  • Web statistics dashboard
  • Per-world vote settings

๐Ÿค Contributing

Contributions are welcome.

  1. Fork the repository
  2. Create a branch
  3. Commit your changes
  4. Open a Pull Request

๐Ÿ“œ License

SleepPolls is licensed under the GNU General Public License v3.0.

See the LICENSE file for details.


โค๏ธ Credits

Developed and maintained by Amethyst Developers.

Built using:

  • Paper
  • Adventure
  • Lamp
  • HikariCP

Made for modern Minecraft servers.

About

A modern sleep voting system for Paper servers that transforms night-time gameplay with democratic polling.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages