CodedRed-Spigot / PlayTimes

The best /playtime plugin! PAPI support, offline checks, API & more!
https://www.spigotmc.org/resources/playtimes-check-players-playtime-server-uptime.58858/
GNU General Public License v3.0
10 stars 13 forks source link

[SUGGESTION] Linked Playtime #67

Closed xOnlyFadi closed 1 month ago

xOnlyFadi commented 1 month ago

Suggestion Template


Suggestion

Description:

Benefits:

CodedRedGIT commented 1 month ago

You can use %global_playtime% and %global_rawtime%

https://github.com/CodedRed-Spigot/PlayTimes/wiki/Bungee-Support

Plugin Use:

%rawtime_serverId% - The total time spent on the server.
%afktime_serverId% - The time spent AFK (Away From Keyboard) on the server.
%playtime_serverId% - The active playtime on the server (rawtime minus afktime, if afk is enabled).
%global_playtime% - The total playtime from all servers.
%global_rawtime% - The total rawtime from all servers.
%global_afktime% - The total afktime from all servers.
xOnlyFadi commented 1 month ago

will it choose the highest playtime for default global placeholder

CodedRedGIT commented 1 month ago

It combines the playtime from all servers and returns the total global time for that player.

xOnlyFadi commented 1 month ago

one question some of the plugins uses the stats file of a player and cannot get the global count of the playtime plugin is there a way to make an option it saves the playtime as that?

CodedRedGIT commented 1 month ago

Playtimes does not modify the players stats file. If you enable database support it will save the player's playtime in either MySQL or SQLite so that the global placeholder can grab the time from other servers.

For other plugins to get the global time from Playtimes you would have to use PlaceholdersAPI. Eventually there will be better API for plugins to hook into PlayTimes.

For PlaceholderAPI (PAPI) Integration:

%PlayTimes_rawtime_serverId%
%PlayTimes_afktime_serverId%
%PlayTimes_playtime_serverId%
%PlayTimes_global_playtime%
%PlayTimes_global_rawtime%
%PlayTimes_global_afktime%
xOnlyFadi commented 1 month ago

I understand, thank you for help.