Zrips / CMI

113 stars 97 forks source link

Playtime is running at afk #8732

Open Manik1348 opened 3 months ago

Manik1348 commented 3 months ago

Description of Issue

Sorry, I'm using a translator.

Time does not stop when a player sends a command /afk

I've seen article #4690, but this is a slightly different situation. In my case, time stops only when the player automatically gets up in AFK. If he sends /afk command time continues to go on

The video was shot by one of my players during technical work. Sorry for the quality.

https://github.com/Zrips/CMI/assets/169908335/8e3c15c6-cca8-445d-950c-12fb6ef299bf

The video shows how the player stands in AFK and how time goes in TAB. I also asked him to write the commands /playtime and /playtimetop

Version Information

[16:02:11 INFO]: --------------------------------------------------

[16:02:11 INFO]: Версия плагина CMI: 9.7.2.9

[16:02:11 INFO]: CMILib: 1.4.7.9

[16:02:11 INFO]: Версия сервера: Purpur(2155) 1.20.4-R0.1-SNAPSHOT-

[16:02:11 INFO]: CMI Экономика: Enabled Версия Vault: 1.7.3-CMICMI Чат: Disabled

[16:02:11 INFO]: Модули -> 40 включено 19 отключено: spawnerProximity, hpBossBar, tablist, armorstand, portals, skin, elytraBoost, spawners, rideAnimation, kits, bossBarCompass, deathMessages, votifier, sitAnimation, spawnerCharge, warmup, vanish, homeInteractions, totemBehavior

[16:02:11 INFO]: --------------------------------------------------

Errors

No response

Relevant Config Sections

# When set to true, players playtime counter stops
  # As of nature how this system works you can see +-1second jumping up and down while checking players playtime
  StopPlayTime: true

Relevant Plugins

Vault 1.7.3 CMILib 1.4.7.9

Agreements

Zrips commented 3 months ago

Do you have PlayTimeFromStats set to true or false in config file?

Manik1348 commented 3 months ago

Do you have PlayTimeFromStats set to true or false in config file?

  # When set to true, player play time will be grabbed from user stats file instead of from CMI user data file
  # This can help to get more accurate play time if you have older server and using players stats feature
  # Recommended to keep this at true
  PlayTimeFromStats: true

I suspect that I should set the values to false?

Zrips commented 3 months ago

In general it's better to have it at true. Which placeholder are you using to display players playtime? And does /cmi playtime [playerName] reports increasing playtime?

Manik1348 commented 3 months ago

In general it's better to have it at true. Which placeholder are you using to display players playtime? And does /cmi playtime [playerName] reports increasing playtime?

On the TAB, I use the values of %statistic_played time:minutes% / %statistic_played time:hours% /%statistic_played time:days%, and at first I thought it was a mistake, but if you watch the video at 0:36 seconds, where the player sends the /cmi playtime command, and at 0:47 seconds, when he also sends this command, it becomes clear that the time of it still continues to go. So the fact that I use other placeholders doesn't really matter.

I hope I understood you correctly

Zrips commented 3 months ago

Will make some changes for afk handling, tho can't really reproduce your issue at the moment. Just wondering, do you have DisableOnCommand enabled for afk handling in config file?

Manik1348 commented 3 months ago

Will make some changes for afk handling, tho can't really reproduce your issue at the moment. Just wondering, do you have DisableOnCommand enabled for afk handling in config file?

# Disables afk on command usage
DisableOnCommand: false

no

Manik1348 commented 1 month ago

Are there any changes?