Zrips / CMI

117 stars 99 forks source link

Players who go to bed between 6:30 and 7PM do not trigger the sleep speedup even after 7 #8511

Open Momshroom opened 8 months ago

Momshroom commented 8 months ago

Description of Issue

If you go to bed between 6:30PM, when Minecraft allows you to and 7:00PM when the sleep speedup goes into effect, the sleep speedup will not be triggered at all UNLESS someone else goes to bed after 7, or you get up and go back to bed after 7, OR you are the only player needed to sleep.

example 1: 3 people online in the same world: person 1 goes to bed at 6:30. the other two stay awake: night passes at normal Minecraft speeds for the entire night and no CMI titlemsg shows counting down. (but the action bar does show 1/3 sleeping)

example 2: person 1 goes to bed at 6:30. It acts like normal Minecraft night until person 2 goes to bed at 7:02, then CMI sleep speedup kicks in and the titlemsg says 2/3 Sleeping and shows the fast progression of night.

example 3: all three players go to sleep between 6:30 and morning: Entire night skipped.

Desired behavior: At 7PM, the night speedup kicks in for the number of sleeping players, regardless of whether or not they have been in bed before 7PM.

Version Information

[13:31:28 INFO]: --------------------------------------------------
[13:31:28 INFO]: CMI plugin version: 9.6.10.7 MySQL
[13:31:28 INFO]: CMILib: 1.4.5.2 
[13:31:28 INFO]: Server: Paper(436) 1.20.4-R0.1-SNAPSHOT+
[13:31:28 INFO]: CMI economy: Disabled Vault: 1.7.3-b131 CMI Chat: Disabled 
[13:31:28 INFO]: Modules -> 51 enabled 8 disabled: spawnerProximity, flightCharge, disabledEnchants, mirror, ranks, moneyCheque, spawners, spawnerCharge
[13:31:28 INFO]: --------------------------------------------------

Errors

none

Relevant Config Sections

Sleeping:
  Speedup:
    # When set to true, players can speedup night by sleeping in bed
    # This will allow to speed up night in percentage depending how many players are sleeping in beds in that world
    Enabled: true
    # List of worlds where this should be applied.
    # Keep in mind that time speed up only works on a normal type world and by default you will have only one
    # Set this list to [] if you want to include all possible worlds
    Worlds: []
    # When this set to true time will be speed up only between 13000 and 24000 ticks of the day
    # When having this set to false players can speed up day durring storms or other events
    OnlyDurringNight: true
    # Type of speedup information, can be: none, title, bossbar
    InfoType: title
    # When set to true, players who are in afk mode will be excluded from speed calculations
    ExcludeAfk: true
    # Defines speed to go throw night, bigger numbers will make it go faster and less players you will need to go throw night
    # 100 will result in 100 times faster time
    BaseSpeed: 100
    # Defines minimal speed to go throw night, this is in case there are more players than base speed and calculation return default speed
    MinSpeed: 5
    # Minimal amount of players sleeping in beds before speeding it up
    # Can be defined in 2 formats. When using clean number like 3, then 3 players will have to be sleeping before speedup kicks in
    # If amount is defined with % like 50% then half of server population will have to be sleeping before speedup kicks in
    MinBeforeSpeeding: 1
    # When set to true online players will be informed about missing sleeping people count
    Inform: true
    # Time in seconds between information messages can be shown when player starts or stops sleeping
    InformDelay: 30

Relevant Plugins

none

Agreements

Momshroom commented 8 months ago

This could also be fixed by simply starting the CMI sleep speedup time at 6:30PM when Minecraft allows you to go to bed for the night, though that might still leave issues with people who were already in bed for a storm.