The most robust 'one-player-sleep' plugin on the platform. Local Difficulty compatible!
Quick Links
Contact/Support: Join the ArcanePlugins Discord Guild
Wiki: View Documentation
Repository: Source Code, Issue Tracker
About
It's the most robust one-player-sleep plugin, and it does exactly what it says on the tin.
If you want an elaboration, feel free to read on. ;)
This is a small plugin that makes it so only one player is required to be sleeping, instead of most of the players in the same world, for a world to skip the night, clear the weather, and reset the phantom timers of course. It comes with an easy configuration file where you can disable a few features too.
I've found a handful of 'one player sleep' plugins on this platform, but they seem to be bloated with many things nobody needs, and some have some.. appalling code. I thought it was time I tried solving the issue :)
The reason that SleepFixer is so small and robust is that it doesn't get the job done in stupid ways. Here's why: All other 'One Player Sleep' plugins (that I am aware of) set the time, which not only doesn't seem natural to your players, but it has a side effect of artificially adjusting the local difficulty, and it also messes with the day counter in a way which isn't intended.
more info on 'local difficulty'
Local Difficulty affects the rate of mob spawning in your location. The more you stay in a location, the higher it gets. Plugins which set the time will speed up this process significantly each time which will thus effect the amount of mobs that spawn next to your base.
(Local Difficulty is a vanilla feature of course. SleepFixer is just a one-player-sleep plugin, it does not add any unexpected features, it does not directly affect your mob spawning and so on.)
SleepFixer has none of these issues. How?- this leads back to the first sentence where I said 'it doesn't get the job done in a stupid way'. What SleepFixer does is, when a player joins your server, it'll just tell your server: Ignore this player from the 'players required for sleeping amount'
- which, in Java code, is exactly:
Player#setSleepingIgnored(true)
This means, your server won't care how many players are on the server when a user wants to sleep - it just acts as if the player was on the server by themself, so only one player is required to sleep. This makes SleepFixer extremely robust so it works on those old servers too, maybe even older than 1.7! You can also easily uninstall the plugin if you wanted and it won't leave side effects behind.
And just to reiterate, it also has these additional features (individually configurable, enabled by default):
- clear the weather when a player sleeps (make it sunny);
- on servers that have the Phantom mob (MC 1.9+), it will reset the phantom spawn timers of all players in the same world as a sleeper (as if they just slept too).
Thankfully - now you can say goodbye to the ever-frequent 'please sleep or briefly disconnect' messages, as SleepFixer has you and your players covered. ;)
Why SleepFixer?
- SleepFixer is a tiny, non-bloated plugin that just does what it says on the tin. It's built and updated this way.
- Extremely robust. The plugin operates by only using standard features in your server software. Since there are so few bugs and so few features fit the strict criteria to be added, the plugin barely ever updates.
- No local difficulty shenanigans. Since SleepFixer doesn't mess up your local difficulty or day count (as almost all other One Player Sleep plugins here do), using SleepFixer won't affect the mob spawn rates on your server.
- Toggleable neat features. By default, sleeping clears the weather and the phantom spawn timers of everyone in the same worlds that players sleep.
- Multiversion compatible & supported. Even as old as MC 1.7.. maybe older.
- Free and open source. All of the code that makes SleepFixer tick is fully open-source under the GNU AGPL v3.0 license, allowing anyone to view, modify and even contribute to the code.
Why use this over the gamerule?
In 1.17, Mojang added the gamerule playersSleepingPercentage
. This gamerule, unlike SleepFixer, does not prevent phantoms affecting players and does not skip the weather. If the gamerule did satisfy those features, then I would have discontinued SleepFixer as it would have become unnecessary to maintain for future versions.
tags
one player sleep, 1 player sleep, single player sleep, sleepfixer, sleep fixer, one player sleep plugin, 1 player sleep, minecraft, spigot, spigotmc, paper, papermc, bukkit, lokka30, bukkit plugin, bukkit plugins