Skip to content
KeyxraxPublic

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

PlayTime

A lightweight playtime tracker for Paper servers. Counts only the time players are actually active, with a top-10 GUI, daily/weekly stats and PlaceholderAPI support.

Features

  • Total, daily and weekly (last 7 days) playtime per player
  • AFK detection: playtime pauses when a player is idle (default: 5 minutes). Movement, chat, commands, clicks, block break/place, combat and riding vehicles all count as activity
  • Top 10 leaderboard in a GUI (player heads, gold/silver/red ranks, your own stats)
  • PlaceholderAPI expansion (optional)
  • Thread-safe data model and safe saving (temp file + atomic replace, backup of an unreadable data.yml)
  • Every message and setting is configurable

Requirements

Commands

Command Description Permission
/playtime (/pt) Your playtime playtime.use (default: everyone)
/playtime top Open the top-10 GUI playtime.top (default: everyone)
/playtime <player> Another player's playtime playtime.others (default: op)
/playtime reload Reload config.yml playtime.admin (default: op)
/playtime reset <player> Reset a player's playtime playtime.admin (default: op)

Placeholders

Placeholder Example
%playtime_total% 2d 3h 15m
%playtime_today% 1h 20m
%playtime_week% 9h 5m
%playtime_hours% 51
%playtime_seconds% 183900
%playtime_rank% 3 (or -)
%playtime_afk% true / false

Configuration

plugins/PlayTime/config.yml

save-interval-minutes: 5   # how often data.yml is saved
afk:
  enabled: true
  seconds: 300             # idle time before playtime pauses
gui:
  title: "&b&lTop Playtime"

All chat messages live under messages: and support & color codes.

Data is stored in plugins/PlayTime/data.yml. Daily stats are kept for 30 days.

Building

./gradlew build

The jar is created in build/libs/. Requires JDK 21.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages