MC-Machinations / PaperTweaks

A better-performance replacement for the popular VanillaTweaks datapack collection.
GNU General Public License v3.0
141 stars 13 forks source link

Multiplayer sleep #86

Open daretmavi opened 9 months ago

daretmavi commented 9 months ago

Expected behavior

Should work if activated

Observed/Actual behavior

I have to change playersSleepingPercentage gamerule manually to activate it.

Steps/models to reproduce

Plugin and Datapack List

Server Plugins (24): Paper Plugins:

There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [file/LightBlockEditor.zip (world)]

Server Version Info

paper-1.20.4-422

Plugin Version

0.4.1

Other

No response

Machine-Maker commented 9 months ago

The gamerule is how the percentage is controlled. If the percentage is still 100, then of course it won't do anything as it still requires all players to be sleeping. What do you think should happen when it's activated? I don't think it's a good idea to arbitrarily change the playersSleepingPercentage gamerule if someone has the module enabled.

daretmavi commented 9 months ago

Why not? If I activate this module, then I expect that only one player has to sleep - this means it should change the rule, if it is the way how it works. If I deactivate it, then the rule should change back to default. What other meaning should this module have?

Machine-Maker commented 9 months ago

The module is configurable tho. It isn't always the case that if the module is active, sleeping should work with only 1 person. It is configurable so that half the players are sleeping, or 3/4 or any fraction of the online players. So just saying if the module is enabled, set the sleeping percent to 1 (so 1 player can sleep) doesn't cover all the use cases.

daretmavi commented 9 months ago

Ok, I misunderstood the function. No problem, I'll just turn it off and use VanilaTweaks.

You could eventually add the sleepers % in the config.