Nuytemans-Dieter / BetterSleeping

A Spigot plugin that will make sleeping on servers less of a hassle
https://www.spigotmc.org/resources/bettersleeping-1-12-1-15.60837/
Apache License 2.0
84 stars 73 forks source link

feature for punishing disconnected players before sleeping #309

Closed PhilippVn closed 7 months ago

PhilippVn commented 7 months ago

Currently players can avoid getting debuffs for not sleeping by disconnecting while/before other players are sleeping. This is unfair because players that stayed on the server and didnt sleep get the debuffs but the players that disconnected right before and joined in after a couple of seconds essentially dode sleeping penalties.

This feature aims at detecting players doing this and ensures that the players still get the debuffs when they reconnect.

It works by comparing the number of nights people have slept on the server by the time the player disconnects. when the player connects again it will check if there was a another sleeping cycle and if yes it will punish the player for not sleeping that night.