plan-player-analytics / Plan

Player Analytics plugin for Minecraft Server platforms - View player activity of your server with ease. :calendar:
https://www.spigotmc.org/resources/plan-player-analytics.32536/
GNU Lesser General Public License v3.0
865 stars 170 forks source link

Player Time Placeholders Based on Specific Clock Times #3410

Closed TheMattVid closed 9 months ago

TheMattVid commented 9 months ago

I would like to be able to..

Players type the command /ontime or some other equivalent, where they can see their non-afk playtime for Today, This Week, This Month, and All-Time. Today=Since 12am of the current day This Week=Since 12am on the most recent Sunday This Month=Since 12am on the 1st day of the current month All-Time=All time since the server started tracking data

/ontime would display those same stats for a specified player.

Additionally, /ontime top <today/week/month/total>, which lists the top 10(?) usernames of the players with the highest online time in the specified period.

Is your feature request related to a problem? Please describe.

It's a fairly niche problem. I have a rank signup, with the requirements being 5 hours. Players who sign up and hit the 5 hours get the rank for the following week. I currently use the Ontime plugin, and players use the /ontime command to track their own time to see how close they are to reaching the target time. Another aspect to the problem is that the Ontime plugin exports weekly report txt files automatically, and then I can copy and paste that txt file into a spreadsheet, and then I have another sheet with the list of signed-up users that runs a vlookup on the data I pasted in. I could definitely use some sort of automated data export, but I will save that request for a separate feature request.

AuroraLS3 commented 9 months ago

You can use PlaceholderAPI to achieve most of the required data (the player active playtime placeholders), though Plan uses time windows (24h etc) rather than clock to filter which playtime applies, since timezones are a pain in the butt.

When using placeholders in commands remember to add them to Plan config under PlaceholderAPI settings so that they're loaded on player join.

Currently /plan ingame shows some of this.

Could you adjust your request to be about adding more placeholders if needed or close this if the existing ones can fill your needs? Writing such a specific command seems it doesn't benefit enough users, but placeholders can be easily added and allow high customization like you need

TheMattVid commented 9 months ago

Sure thing, I can adjust the request. Do you just need me to update the title, or should I edit part of the body too?

Additionally, are the placeholders you are proposing to add the player time versions of time periods that start at specific clock times? In that case, I can title this issue "Player Time Placeholders Based on Specific Clock Times".

AuroraLS3 commented 9 months ago

Yeah if the window based times aren't enough there could be _since_day_start etc

TheMattVid commented 9 months ago

I've thought about this some more, and I can definitely revise my system to use the time windows and it will work just as well. Thank you for pointing me in the direction of the placeholders, they are working nicely! I will go ahead and close this issue.