Players that are both sleeping and AFK will count towards the number of players sleeping, but not towards the total number of players (for calculating percentages, etc.), allowing, for instance, a minority of players to skip night even if a majority of players is required to sleep.
This can easily be reproduced by entering a bed and then using EssentialX's /afk command.
Furthermore, it would be nice to have a configurable option that allows the percentage to be calculated based on the highest number of online, non-AFK players recently online (say, the last 3 minutes, or a configurable option), in order to prevent players from intentionally going AFK or disconnecting in order to inflate the percentage of sleeping players -- I may be able to submit a pull request for this, time permitting, if you'd like.
Players that are both sleeping and AFK will count towards the number of players sleeping, but not towards the total number of players (for calculating percentages, etc.), allowing, for instance, a minority of players to skip night even if a majority of players is required to sleep.
This can easily be reproduced by entering a bed and then using EssentialX's
/afkcommand.Furthermore, it would be nice to have a configurable option that allows the percentage to be calculated based on the highest number of online, non-AFK players recently online (say, the last 3 minutes, or a configurable option), in order to prevent players from intentionally going AFK or disconnecting in order to inflate the percentage of sleeping players -- I may be able to submit a pull request for this, time permitting, if you'd like.