nkomarn/harbor

Players can bypass requirements by temporarily going AFK

Stellarain opened this issue · 2 comments

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.

I'd really like to see this @Stellarain - I would like players to be able to indicate they're AFK if they're stepping out for a few minutes, but do not want them to be able to cheese the use of beds in this way or otherwise by just using the /afk command to avoid needing to get into a bed at all.

Alternatively, an option to ignore the essentials AFK and use the built in one could work.