Configuration option for showing sleep messages#6864
Conversation
The minecraft server now announces sleep progress, e.g. players already sleeping or the night being skipped, to all players on the server through a hotbar messages. While this vanilla behaviour works well in vanilla itself it is not always appreciated, especially when hiding players. This commit introduces a new sleep configuration node in the player world configuration that allows server administrators to prevent the server from sending either one of the messages to the clients connected.
|
About now im thinking.. in API not exists a method for get players need for sleep? |
|
really not a fan of disabling a vanilla feature like this for a bandaid fix. much rather would have an event for the announcing, which exposes the counts and and maybe even the message. then the vanish plugin can hook into that. |
Yeah I figured as much, thanks for the feedback I'll update the PR shortly. |
|
I think people who use sleep datapacks/plugins could still find such option useful. |
My main reason to at least attempt a config option was the fact that events will just generate a bunch of different plugins to disable the feature in the end anyway, spreading out something that could be standardized in the server software. But I guess it is a way cleaner fix for us to leave this functionality to the community to implement as we can solve both issues (disable completely and modify) with events. |
|
well, maybe we should have both then. but I for sure want the event so vanish plugins can handle this properly. |
|
Fair. We could have the config option cause the event to fire in already canceled state - then we can solve both of these use cases at once. |
|
I absolutely agree 👍 I'll close the PR for now as I believe the event layout needs a bit of thinking (e.g. single event ? multiple events ? how will the status state be represented ?) that I do not have the time for to finish before sunday, so if others want to give it a try, go for it 👍 I'll be opening a respective PR with the above suggestions next week if no alternative solution has been proposed. |
Configuration option for showing sleep messages
The minecraft server now announces sleep progress, e.g. players already
sleeping or the night being skipped, to all players on the server
through a hotbar messages.
While this vanilla behaviour works well in vanilla itself it is not
always appreciated, especially when hiding players.
This commit introduces a new sleep configuration node in the player
world configuration that allows server administrators to prevent the
server from sending either one of the messages to the clients connected.
Resolves: #6863
A PR to the PaperDocs will follow once this PR has been approved/finalized to the point of approval.
Additionally a few questions I ran into while making this:
sleepwas added as well as its only child nodemessages. This could be reduced tosleep-messages.