ArVdC / TimeManager

Bukkit plugin for time management and display
https://dev.bukkit.org/projects/mc-timemanager/files
Eclipse Public License 1.0
7 stars 3 forks source link

Sleep not Working on PaperMc 1.16.4 #9

Closed Vadrome closed 3 years ago

Vadrome commented 3 years ago

Sleeping doesn't set the time accordingly.

> [01:04:18 INFO]: Vadrome issued server command: /tm checkconfig
> [01:04:33 INFO]: [TimeManager] Too late... morning might never come.
> [01:05:17 INFO]: Vadrome issued server command: /tm set sleep true
> [01:05:17 INFO]: [TimeManager] The world mc16paper 'sync' option was forced to false in order to allow players to sleep until the dawn.
> [01:05:17 INFO]: [TimeManager] It is allowed to sleep until the dawn in the world mc16paper.
> [01:05:17 INFO]: [TimeManager] The world mc16paper will now use the asynchronous decrease speed scheduler.
> [01:05:21 INFO]: [TimeManager] Player Vadrome is sleeping now (1/100 ticks).
> [01:05:26 INFO]: [TimeManager] Sleep time is almost reached (99/100 ticks).
> [01:05:26 INFO]: [TimeManager] Achieved ! (100/100 ticks) Now waiting for the morning.
> [01:05:26 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to false for the world mc16paper.
> [01:05:26 INFO]: [TimeManager] Too late... morning might never come.
> > > [01:06:27 INFO]: Vadrome issued server command: /tm set speed 5
> [01:06:27 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to true for the world mc16paper.
> [01:06:27 INFO]: [TimeManager] If necessary, launch the scheduler corresponding to the asked speed value.
> [01:06:27 INFO]: [TimeManager] The world mc16paper will now use the asynchronous increase speed scheduler.
> [01:06:27 INFO]: [TimeManager] The speed of the world mc16paper is now multiplied by 5.0.
> [01:06:27 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to true for the world mc16paper.
> [01:06:27 INFO]: [TimeManager] The world mc16paper will now use the asynchronous increase speed scheduler.
> [01:06:39 INFO]: Vadrome issued server command: /tm set speed 8
> [01:06:39 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to true for the world mc16paper.
> [01:06:39 INFO]: [TimeManager] If necessary, launch the scheduler corresponding to the asked speed value.
> [01:06:39 INFO]: [TimeManager] The world mc16paper will now use the asynchronous increase speed scheduler.
> [01:06:39 INFO]: [TimeManager] The speed of the world mc16paper is now multiplied by 8.0.
> [01:06:56 INFO]: Vadrome issued server command: /tm set speed 10
> [01:06:56 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to true for the world mc16paper.
> [01:06:56 INFO]: [TimeManager] If necessary, launch the scheduler corresponding to the asked speed value.
> [01:06:56 INFO]: [TimeManager] The world mc16paper will now use the asynchronous increase speed scheduler.
> [01:06:56 INFO]: [TimeManager] The speed of the world mc16paper is now multiplied by 10.0.
> [01:07:44 INFO]: Vadrome issued server command: /tm set speed .265
> [01:07:44 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to false for the world mc16paper.
> [01:07:44 INFO]: [TimeManager] If necessary, launch the scheduler corresponding to the asked speed value.
> [01:07:44 INFO]: [TimeManager] The world mc16paper will now use the asynchronous decrease speed scheduler.
> [01:07:44 INFO]: [TimeManager] The speed of the world mc16paper is now multiplied by 0.265.
> [01:07:44 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to false for the world mc16paper.
> [01:07:44 INFO]: [TimeManager] The world mc16paper will now use the asynchronous decrease speed scheduler.
> [01:07:52 INFO]: [TimeManager] Player Vadrome is sleeping now (1/100 ticks).
> [01:07:57 INFO]: [TimeManager] Sleep time is almost reached (99/100 ticks).
> [01:07:57 INFO]: [TimeManager] Achieved ! (100/100 ticks) Now waiting for the morning.
> [01:07:57 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to false for the world mc16paper.
> [01:07:57 INFO]: [TimeManager] Too late... morning might never come.
> [01:08:40 INFO]: Vadrome issued server command: /now
> [01:08:40 INFO]: [TimeManager] Given tick "13681" was converted to "19:40:51".
> [01:08:42 INFO]: Vadrome issued server command: /now
> [01:08:42 INFO]: [TimeManager] Given tick "13693" was converted to "19:41:34".
> [01:08:42 INFO]: Vadrome issued server command: /now
> [01:08:42 INFO]: [TimeManager] Given tick "13701" was converted to "19:42:03".
> [01:08:43 INFO]: Vadrome issued server command: /now
> [01:08:43 INFO]: [TimeManager] Given tick "13709" was converted to "19:42:32".
> [01:08:44 INFO]: Vadrome issued server command: /now
> [01:08:44 INFO]: [TimeManager] Given tick "13717" was converted to "19:43:01".
> [01:08:45 INFO]: Vadrome issued server command: /now
> [01:08:45 INFO]: [TimeManager] Given tick "13725" was converted to "19:43:30".
> [01:08:45 INFO]: Vadrome issued server command: /now
> [01:08:45 INFO]: [TimeManager] Given tick "13733" was converted to "19:43:58".
> [01:08:46 INFO]: Vadrome issued server command: /now
> [01:08:46 INFO]: [TimeManager] Given tick "13737" was converted to "19:44:13".
> [01:08:46 INFO]: Vadrome issued server command: /now
> [01:08:46 INFO]: [TimeManager] Given tick "13741" was converted to "19:44:27".
> [01:08:47 INFO]: Vadrome issued server command: /now
> [01:08:47 INFO]: [TimeManager] Given tick "13749" was converted to "19:44:56".
> [01:08:48 INFO]: Vadrome issued server command: /now
> [01:08:48 INFO]: [TimeManager] Given tick "13753" was converted to "19:45:10".
> [01:08:48 INFO]: Vadrome issued server command: /now
> [01:08:48 INFO]: [TimeManager] Given tick "13761" was converted to "19:45:39".
> [01:08:49 INFO]: Vadrome issued server command: /now
> [01:08:49 INFO]: [TimeManager] Given tick "13765" was converted to "19:45:54".
> [01:08:49 INFO]: Vadrome issued server command: /now
> [01:08:49 INFO]: [TimeManager] Given tick "13773" was converted to "19:46:22".
> [01:08:50 INFO]: Vadrome issued server command: /now
> [01:08:50 INFO]: [TimeManager] Given tick "13777" was converted to "19:46:37".
> [01:08:51 INFO]: Vadrome issued server command: /now
> [01:08:51 INFO]: [TimeManager] Given tick "13785" was converted to "19:47:06".
> [01:08:51 INFO]: Vadrome issued server command: /now
> [01:08:51 INFO]: [TimeManager] Given tick "13789" was converted to "19:47:20".
> [01:08:52 INFO]: Vadrome issued server command: /now
> [01:08:52 INFO]: [TimeManager] Given tick "13797" was converted to "19:47:49".
> [01:08:53 INFO]: Vadrome issued server command: /now
> [01:08:53 INFO]: [TimeManager] Given tick "13805" was converted to "19:48:18".
> [01:08:53 INFO]: Vadrome issued server command: /now
> [01:08:53 INFO]: [TimeManager] Given tick "13811" was converted to "19:48:39".
> [01:08:54 INFO]: Vadrome issued server command: /now
> [01:08:54 INFO]: [TimeManager] Given tick "13821" was converted to "19:49:15".
> [01:08:55 INFO]: Vadrome issued server command: /now
> [01:08:55 INFO]: [TimeManager] Given tick "13829" was converted to "19:49:44".
> [01:08:56 INFO]: Vadrome issued server command: /now
> [01:08:56 INFO]: [TimeManager] Given tick "13837" was converted to "19:50:13".
> [01:08:57 INFO]: Vadrome issued server command: /now
> [01:08:57 INFO]: [TimeManager] Given tick "13845" was converted to "19:50:42".
> [01:08:58 INFO]: Vadrome issued server command: /now
> [01:08:58 INFO]: [TimeManager] Given tick "13853" was converted to "19:51:10".
> [01:08:58 INFO]: Vadrome issued server command: /now
> [01:08:58 INFO]: [TimeManager] Given tick "13861" was converted to "19:51:39".
> [01:08:59 INFO]: Vadrome issued server command: /now
> [01:08:59 INFO]: [TimeManager] Given tick "13869" was converted to "19:52:08".
> [01:09:00 INFO]: Vadrome issued server command: /now
> [01:09:00 INFO]: [TimeManager] Given tick "13877" was converted to "19:52:37".
> [01:09:01 INFO]: Vadrome issued server command: /now
> [01:09:01 INFO]: [TimeManager] Given tick "13889" was converted to "19:53:20".
> [01:09:02 INFO]: Vadrome issued server command: /now
> [01:09:02 INFO]: [TimeManager] Given tick "13897" was converted to "19:53:49".
> [01:09:03 INFO]: Vadrome issued server command: /now
> [01:09:03 INFO]: [TimeManager] Given tick "13905" was converted to "19:54:18".
> [01:09:04 INFO]: Vadrome issued server command: /now
> [01:09:04 INFO]: [TimeManager] Given tick "13915" was converted to "19:54:54".
> [01:09:05 INFO]: Vadrome issued server command: /now
> [01:09:05 INFO]: [TimeManager] Given tick "13925" was converted to "19:55:30".
> [01:09:06 INFO]: Vadrome issued server command: /now
> [01:09:06 INFO]: [TimeManager] Given tick "13933" was converted to "19:55:58".
> [01:09:07 INFO]: Vadrome issued server command: /now
> [01:09:07 INFO]: [TimeManager] Given tick "13941" was converted to "19:56:27".
> [01:09:07 INFO]: Vadrome issued server command: /now
> [01:09:07 INFO]: [TimeManager] Given tick "13949" was converted to "19:56:56".
> [01:09:08 INFO]: Vadrome issued server command: /now
> [01:09:08 INFO]: [TimeManager] Given tick "13959" was converted to "19:57:32".
> [01:09:09 INFO]: Vadrome issued server command: /now
> [01:09:09 INFO]: [TimeManager] Given tick "13967" was converted to "19:58:01".
> [01:09:10 INFO]: Vadrome issued server command: /now
> [01:09:10 INFO]: [TimeManager] Given tick "13975" was converted to "19:58:30".
> [01:09:11 INFO]: Vadrome issued server command: /now
> [01:09:11 INFO]: [TimeManager] Given tick "13985" was converted to "19:59:06".
> [01:09:11 INFO]: Vadrome issued server command: /now
> [01:09:11 INFO]: [TimeManager] Given tick "13993" was converted to "19:59:34".
> [01:09:12 INFO]: Vadrome issued server command: /now
> [01:09:12 INFO]: [TimeManager] Given tick "14001" was converted to "20:00:03".
> [01:09:13 INFO]: Vadrome issued server command: /now
> [01:09:13 INFO]: [TimeManager] Given tick "14009" was converted to "20:00:32".
> [01:09:14 INFO]: Vadrome issued server command: /now
> [01:09:14 INFO]: [TimeManager] Given tick "14017" was converted to "20:01:01".
> [01:09:15 INFO]: Vadrome issued server command: /now
> [01:09:15 INFO]: [TimeManager] Given tick "14021" was converted to "20:01:15".
> [01:09:15 INFO]: Vadrome issued server command: /now
> [01:09:15 INFO]: [TimeManager] Given tick "14029" was converted to "20:01:44".
> [01:09:16 INFO]: Vadrome issued server command: /now
> [01:09:16 INFO]: [TimeManager] Given tick "14037" was converted to "20:02:13".
> [01:09:17 INFO]: Vadrome issued server command: /now
> [01:09:17 INFO]: [TimeManager] Given tick "14045" was converted to "20:02:42".
> [01:09:17 INFO]: Vadrome issued server command: /now
> [01:09:17 INFO]: [TimeManager] Given tick "14053" was converted to "20:03:10".
> [01:09:18 INFO]: Vadrome issued server command: /now
> [01:09:18 INFO]: [TimeManager] Given tick "14059" was converted to "20:03:32".
> [01:09:19 INFO]: Vadrome issued server command: /now
> [01:09:19 INFO]: [TimeManager] Given tick "14065" was converted to "20:03:54".
> [01:09:20 INFO]: Vadrome issued server command: /now
> [01:09:20 INFO]: [TimeManager] Given tick "14073" was converted to "20:04:22".
> [01:09:21 INFO]: Vadrome issued server command: /now
> [01:09:21 INFO]: [TimeManager] Given tick "14081" was converted to "20:04:51".
> [01:09:28 INFO]: [TimeManager] Player Vadrome is sleeping now (1/100 ticks).
> [01:09:33 INFO]: [TimeManager] Sleep time is almost reached (99/100 ticks).
> [01:09:33 INFO]: [TimeManager] Achieved ! (100/100 ticks) Now waiting for the morning.
> [01:09:33 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to false for the world mc16paper.
> [01:09:33 INFO]: [TimeManager] Too late... morning might never come.
> [01:10:30 INFO]: Vadrome issued server command: /gamerule doDaylightCycle true
> [01:10:30 INFO]: [Vadrome: Gamerule doDaylightCycle is now set to: true]
> [01:10:35 INFO]: [TimeManager] Player Vadrome is sleeping now (1/100 ticks).
> [01:10:40 INFO]: [TimeManager] Sleep time is almost reached (99/100 ticks).
> [01:10:40 INFO]: [TimeManager] Achieved ! (100/100 ticks) Now waiting for the morning.
> [01:10:40 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to false for the world mc16paper.
> [01:10:40 INFO]: [TimeManager] Too late... morning might never come.
> stopave-alltopave-alltopave-alltopave-alltopave-alltop stopave-alltopave-alltopave-all[0 1:11:25 INFO]: Vadrome issued server command: /now
> save-all[01:11:25 INFO]: [TimeManager] Given tick "15536" was converted to "21:32:09".

It's the only plugin installed. config.txt

ArVdC commented 3 years ago

Hi, Thanks for reporting this issue. The next update (v1.4.2) should fix this sleep problem. I should publish it this evening.

ArVdC commented 3 years ago

Hope this will work fine now. Could you please confirm that ? https://github.com/ArVdC/TimeManager/releases/tag/v1.4.2

Vadrome commented 3 years ago

Still the same Problem, anything I might be doing wrong / can do to avoid this ?

[23:07:51 INFO]: Running delayed init tasks
[23:07:51 INFO]: Done (5.078s)! For help, type "help"
[23:07:51 INFO]: Timings Reset
[23:07:51 INFO]: [TimeManager] The server's initial tick was get from the config.yml.
[23:07:51 INFO]: [TimeManager] The server's initial tick is #1719079 (23:52:33 UTC).
[23:07:51 INFO]: [TimeManager] The server's current tick is #1593426 (22:07:51 UTC).
[23:07:51 INFO]: [TimeManager] The world mc16paper had its time resynchronized to the server time
[23:07:51 INFO]: [TimeManager] Resync: Calculation of [actualTime] for world mc16paper:
[23:07:51 INFO]: [TimeManager] [elapsedTime] = ([currentServerTick] - [initialTick]) % [ticksInOneDay] = (1593426 - 1719079) % 24000 = -5653 restrained to one day = 18347
[23:07:51 INFO]: [TimeManager] [adjustedElapsedTime] = [elapsedTime] * [speedModifier] = 18347 * 0.265 = 4861.955
[23:07:51 INFO]: [TimeManager] [actualTime] = [worldStartAt] + [adjustedElapsedTime] = 0 + 4861.955 = 4861.955 restrained to one day = tick #4861
[23:07:51 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to false for the world mc16paper.
[23:07:51 INFO]: [TimeManager] Given tick "0" was converted to "06:00:00".
[23:07:51 INFO]: [TimeManager] Given tick "4861" was converted to "10:51:39".
[23:07:51 INFO]: [TimeManager] The world mc16paper is running since 80 whole day(s) (0001-03-22).
[23:07:51 INFO]: [TimeManager] The world mc16paper starts at 06:00:00 (+0 ticks).
[23:07:51 INFO]: [TimeManager] The world mc16paper's current time is 10:51:39 (#4861).
[23:07:51 INFO]: [TimeManager] The world mc16paper's current speed is 0.265.
[23:07:51 INFO]: [TimeManager] The world mc16paper will now use the asynchronous decrease speed scheduler.
[23:07:51 INFO]: [TimeManager] All worlds have been syncronized to the server time. If you want to keep them synchronized, set their 'sync' option to true.
[23:07:56 INFO]: [TimeManager] Last version on bukkit/curse is 1.4.1 and you are running the 1.4.2
[23:07:56 INFO]: [TimeManager] No update was found, you are running the latest version.
[23:07:58 INFO]: UUID of player Vadrome is 54e45318-763d-4936-ac09-5cdc964e7d76
[23:07:59 INFO]: Vadrome joined the game
[23:07:59 INFO]: Vadrome[/92.104.104.77:55216] logged in with entity id 253 at ([mc16paper]-1104.9121767486943, 89.0, 45.990983363149105)
[23:08:07 INFO]: Vadrome issued server command: /now
[23:08:07 INFO]: [TimeManager] Given tick "4941" was converted to "10:56:27".
[23:08:12 INFO]: Vadrome issued server command: /tm set time night
[23:08:12 INFO]: [TimeManager] The world mc16paper will now use the asynchronous decrease speed scheduler.
[23:08:12 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to false for the world mc16paper.
[23:08:12 INFO]: [TimeManager] Given tick "13000" was converted to "19:00:00".
[23:08:12 INFO]: [TimeManager] The current time of the world mc16paper is now set to tick #13000 (19:00:00).
[23:08:14 INFO]: [TimeManager] Player Vadrome is sleeping now (1/100 ticks).
[23:08:19 INFO]: [TimeManager] Sleep time is almost reached (99/100 ticks).
[23:08:19 INFO]: [TimeManager] Achieved ! (100/100 ticks) Now waiting for the morning.
[23:08:19 INFO]: [TimeManager] The gamerule doDaylightCycle is now set to false for the world mc16paper.
[23:08:44 INFO]: [TimeManager] Too late...  morning might never come.
[23:08:49 INFO]: Vadrome issued server command: /now
[23:08:49 INFO]: [TimeManager] Given tick "13184" was converted to "19:11:02".
ArVdC commented 3 years ago

Maybe I have an idea. I'll check this tomorrow. Until then could you try with another value of refreshRate ?

Vadrome commented 3 years ago

I did a bit of testing with /tm set speed Any speed value greater or equal to 1 works. Anything below 1 doesn't

ArVdC commented 3 years ago

I actualised the file, I think it's fixed. https://github.com/ArVdC/TimeManager/releases/tag/v1.4.2

Vadrome commented 3 years ago

It works now, thx