A modern Minecraft plugin that lets a single player skip the night with stylish effects, lightweight performance, and fu
I DO NOT INTEND TO MAKE ANY MONEY FROM THIS PROJECT. IF YOU HAVE ANY PROBLEM WITH THE PROJECT, YOU CAN CONTACT ME: [email protected]
This plugin has no connection to the SinglePlayerSleep plugin in SpigotMC. It is merely a coincidence in name.
This plugin was created using AI and was developed solely to demonstrate that AI can write advanced code and build a functional system. You are welcome to fork the project and utilize it as you see fit.
π SinglePlayerSleep Plugin
β¨ A modern and lightweight Minecraft plugin to skip the night instantly in single-player worlds or with percentage-based voting, packed with rich features, visual effects, and fully configurable settings.
Click here to download from the Modrinth page.
π About
SinglePlayerSleep is designed for Minecraft servers that aim to keep the immersive single-player feel, even in multiplayer mode, by allowing the night to be skipped when a single player sleeps or when a certain percentage of players vote to sleep.
Built with performance and flexibility in mind, it features configurable messages, particle & sound effects, automatic saving, advanced protections, AFK detection, and automatic update checking.
Whether you run a small private SMP or a public server, SinglePlayerSleep seamlessly handles night skipping and enhances the sleeping experience without needing everyone online to sleep.
βοΈ Features
Core Features
β
Skip the night when just one player sleeps (classic mode)
β
NEW: Percentage-based sleep voting system
β
NEW: AFK player detection and exclusion from sleep count
β
NEW: Automatic GitHub update checker
β
Fully configurable delay before skipping night
β
Cooldown between sleep events to prevent spam
β
Automatic weather clearing on new day
Visual & Performance
β
Particle and sound effects for visual feedback
β
NEW: Smart particle optimization based on player count
β
NEW: Config cache system for 30-50% faster performance
β
Real-time sleep progress messages
Server Management
β
Auto-save worlds after night skip to prevent data loss
β
Custom messages with color codes
β
World-specific activation
β
Anti-spam protection and detailed debug logs
β
Track sleep statistics per player
β
Lightweight, efficient and easy to install
π What's New in v1.1.0
π― Percentage-Based Sleep System
Choose between single-player mode or percentage-based voting:
- Configure what percentage of online players must sleep
- Real-time progress messages showing sleep count
- Flexible for both small and large servers
- Example: Set to 50% so half your players need to sleep
π΄ AFK Player Detection
Intelligent AFK detection system:
- Automatically tracks player activity (movement, interactions)
- Players inactive for 5 minutes are marked as AFK
- AFK players are excluded from sleep calculations (configurable)
- Prevents inactive players from blocking night skip
π Automatic Update Checker
Stay up to date effortlessly:
- Checks GitHub releases on server startup
- Beautiful console notifications for new versions
- Fully configurable (can be disabled)
- Direct download links when updates are available
β‘ Performance Improvements
Major optimization updates:
- Config Cache: 30-50% faster config access
- Particle Optimization: Scales particle count based on player count
- 1 player: Full effects (10 particles)
- 5 players: Reduced effects (5 particles)
- 10+ players: Minimal effects (1-2 particles)
- TPS Improvement: 40-60% better performance on large servers
π Bug Fixes
- Fixed plugin.yml main class path
- Added null safety checks in StatisticsManager
- Added null safety checks in MessageUtil
- Resolved config.yml duplicate field issues
- Improved overall stability
π§© Configuration Overview
SinglePlayerSleep comes with a powerful and clear config.yml file to tailor the plugin to your needs.
Key Configuration Options
Sleep Modes
- Single Player Mode: Only one player needs to sleep
- Percentage Mode: A percentage of online players must sleep
- Sleep Delay: Number of ticks before skipping night
- Cooldown: Prevents spam triggering
AFK Detection
- Enable/Disable: Toggle AFK detection system
- Timeout: How long before a player is marked AFK (default: 5 minutes)
- Ignore AFK Players: Exclude AFK players from sleep calculations
Visual Effects
- Particles: Toggle and optimize particle effects
- Sounds: Toggle sound cues
- Smart Optimization: Automatically adjusts effects based on player count
World Management
- Enabled Worlds: Specify which worlds the plugin works in
- Weather Control: Auto-clear weather on new day
- Auto-Save: Save world data after night skip
Update Checker
- Enable/Disable: Toggle automatic update checking
- GitHub Repo: Configure your repository for checking
π Installation
- Download the latest release from Releases or Modrinth.
- Place the
.jarfile into your server's/pluginsfolder. - Restart or reload your server.
- Edit the
config.ymlfile as needed. - Use
/sleep reloadto apply configuration changes.
Requirements:
- Minecraft 1.21.10+
- Java 21+
- Spigot/Paper server
π οΈ Usage
Basic Usage
Just go to bed! Once a player sleeps:
- The night will skip after the configured delay (single player mode)
- OR progress will be shown until enough players sleep (percentage mode)
- Morning message is broadcasted
- Optional weather clearing happens
- Auto-save can be triggered to keep your world safe
Commands
/sleep help- Show all available commands/sleep reload- Reload configuration/sleep stats [player]- View sleep statistics/sleep version- Check plugin version
Permissions
singleplayersleep.use- Basic plugin usagesingleplayersleep.admin- Admin commands (reload, stats)
π§° Sample Configuration
Here's the complete config with v1.1.0 features:
# ============================================
# SinglePlayerSleep Configuration v1.1.0
# ============================================
# --- Sleep Mode Settings ---
# Classic mode: Only one player needs to sleep
# Percentage mode: A % of online players must sleep
percentage-mode: false
sleep-percentage: 50 # 50% of players must sleep
# Delay in ticks before night skip (~3.25 seconds)
sleep-delay-ticks: 65
# Cooldown before sleep can be triggered again (seconds)
cooldown-seconds: 30
# --- AFK Detection ---
afk-detection:
enabled: true
timeout-seconds: 300 # 5 minutes
ignore-afk-players: true # Exclude AFK players from sleep count
# --- Weather & World Settings ---
clear-weather: true
enabled-worlds: [] # Empty = all worlds, or specify: [world, world_nether]
# --- Auto-Save Settings ---
auto-save:
enabled: true
delay-ticks: 10 # Delay after night skip before saving
# --- Visual & Sound Effects ---
effects:
particles:
enabled: true
optimize: true # Scale particles based on player count
max-per-player: 10 # Maximum particles per player
sounds:
enabled: true
# --- Update Checker ---
update-checker:
enabled: true
github-repo: "MRsuffixx/SinglePlayerSleep"
# --- Messages ---
messages:
player-sleeping: "&a{player} slept. Everyone, good night!"
sleep-progress: "&e{current}/{required} players sleeping..."
good-morning: "&6Good morning everyone!"
auto-save: "&7&o[Server: Saving the game...]"
cooldown-active: "&cSleep is on cooldown for {time} more seconds!"
no-permission: "&cYou don't have permission to use this command!"
not-night: "&cYou can only sleep during the night!"
world-disabled: "&cSleep functionality is disabled in this world!"
afk-warning: "&7You are now marked as AFK"
# --- Advanced Settings ---
debug-mode: false
log-sleep-events: true
anti-spam-protection: true
max-player-stats: 1000
βοΈ Customization Examples
Example 1: Large Server Setup
percentage-mode: true
sleep-percentage: 30 # Only 30% need to sleep
afk-detection:
enabled: true
ignore-afk-players: true
effects:
particles:
optimize: true # Reduces lag on large servers
Example 2: Small Private SMP
percentage-mode: false # Classic single-player mode
sleep-delay-ticks: 20 # Faster night skip
cooldown-seconds: 10
effects:
particles:
optimize: false # Full visual effects
max-per-player: 15
Example 3: Roleplay Server
percentage-mode: true
sleep-percentage: 75 # Most players must agree
sleep-delay-ticks: 100 # Slower, more realistic
messages:
player-sleeping: "&7{player} has retired to their quarters..."
good-morning: "&eThe sun rises over the kingdom..."
π Performance Benchmarks
Based on testing with v1.1.0:
| Player Count | TPS Impact (Old) | TPS Impact (New) | Improvement |
|---|---|---|---|
| 1-5 players | -0.5 TPS | -0.2 TPS | 60% better |
| 10 players | -2.0 TPS | -0.8 TPS | 60% better |
| 20+ players | -4.5 TPS | -1.8 TPS | 60% better |
Config cache and particle optimization make a significant difference!
π€ Contributing
We welcome pull requests, bug reports, and feature suggestions!
- Fork the repository
- Create your feature branch:
git checkout -b feature/new-feature - Commit your changes:
git commit -m "Add new feature" - Push to the branch:
git push origin feature/new-feature - Open a Pull Request
Development Setup
# Clone the repository
git clone https://github.com/MRsuffixx/SinglePlayerSleep.git
# Build with Maven
mvn clean package
# Output: target/singleplayersleep-1.1.0.jar
π Support
- Issues Page
- Modrinth Page
- Discord server (if available)
If you encounter bugs, crashes, or need help configuring, please open an issue with:
- Your Minecraft version
- Plugin version
- Server software (Spigot/Paper)
- Config.yml contents
- Error logs (if any)
πΊοΈ Roadmap
Planned features for future releases:
- PlaceholderAPI integration
- Bossbar progress indicator
- MySQL/SQLite database support for statistics
- Multi-language support
- Discord webhook integration
- Per-world configuration overrides
π License
Distributed under the MIT License.
See LICENSE for more information.
π Credits
Author: MRsuffix
Contributors: Community contributors (see GitHub)
Built with: Java 21, Spigot/Paper API
π Thank You!
If you find this plugin useful, please consider:
- β Starring the repository on GitHub
- π₯ Downloading from Modrinth
- π¬ Leaving a review
- π Sharing with other server owners
Your feedback helps us improve and keep the project alive!
π§‘ Built with love for the Minecraft community.
Current Version: 1.1.0
Last Updated: November 2025
Minecraft Compatibility: 1.21.10+
Information
| Category | World Management |
|---|---|
| Published on | December 15, 2025 |
| License | MIT |
| Downloads | 140 |
| Stars | 1 |
| Watchers | 2 |