PlayerActivity » 1.7 - 1.21.10 icon

PlayerActivity » 1.7 - 1.21.10 -----

AFK-aware activity graphs, command usage stats, and tools your staff actually use.




[​IMG]

Ever wanted to accurately track what day and what time your players are online and aren't AFK?

[​IMG]

Command
/playeractivity

Permission
playeractivity.view

Additional features
1. FOCUS TRACKING (STAFF / WATCH LISTS)
2. COMMAND TRACKER
3. RTP
4. DISCORD WEBHOOK

This plugin could easily replace your
servers current staffing plugin too!

[​IMG]

[​IMG]
Code (YAML):
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃                 PlayerActivty - config.yml                   ┃
# ┃        Graphs, AFK-aware activity, command tracking,         ┃
# ┃        random staff teleport & focused player tools          ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛


# ╔══════════════════════════════════════════════════════════════╗
# ║  PLAYER ACTIVITY GRAPH                                       ║
# ╚══════════════════════════════════════════════════════════════╝
activity-graph
:
  # Characters used to draw the bars in the graph
  full
: "█"
  empty
: "░"

  # Title banner line at the top of /playeractivity
  header
: "&8&m-----------&r &6 &eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &8&m-----------"

  # Title for the combined (days + grouped hours) graph section
  combined-section-title
: "&fActivity Overview Graphs &7(&fDays &7▏ &fHours&7)"

  # Text label in the middle of the graph separating days from hours
  separator-label
: " "

  # Legend explaining what each bar color means
  legend
: "&7Legend: &a█ ᴏɴʟɪɴᴇ &8| &b█ ᴀᴄᴛɪᴠᴇ &7(ɴᴏɴ-ᴀꜰᴋ)"

  # X-axis styling:
  # %line% is replaced by a repeated "―" to match label count.
  x-axis-line
: "&8%line%"

  # Labels text style for the days/hours under the graph
  x-axis-labels
: "&7%label%"

  # Summary line printed underneath the graph.
  # Placeholders:
  #   %day-online%   - day name of peak average online (e.g. Sun)
  #   %hour-online%  - time window of peak online (e.g. 4:00–7:59 PM)
  #   %day-active%   - day name of peak average active (non-AFK)
  #   %hour-active%  - time window of peak active
  summary
:
    format
: "&aPeak Online:&f %day-online% @ %hour-online% &8- &bPeak Active:&f %day-active% @ %hour-active%"

  # Layout of the /playeractivity output.
  # Special placeholders:
  #   %header%                  - header line above
  #   %combined-section-title%  - section title text
  #   %combined-graph%          - the generated graph lines (days + hours)
  #   %summary%                 - the combined summary line above
  #   %legend%                  - legend string
  #
  # Centered text:
  #   %center:Your text here%   - will be horizontally centered in chat
  main-message
:
   - "%header%"
    - "%combined-section-title%"
    - "%combined-graph%"
    - "%summary%"
    - "%legend%"

  # If the plugin hasn’t collected enough data yet, it will show this instead
  # of a possibly misleading/empty graph. Threshold is total "player-minutes"
  # across all tracked hours/days.
  not-ready-message
:
    enabled
: true
    threshold
: 12   # total player-minutes across all hours/days
    message
:
     - ""
      - "&c⚠ &eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &fhas not collected enough data yet!"
      - ""
      - "&7Graphs and trends will become more accurate over time."
      - "&7This threshold is configurable, but please give it some time."


# ╔══════════════════════════════════════════════════════════════╗
# ║  RANDOM TELEPORT (RTP)                                       ║
# ╚══════════════════════════════════════════════════════════════╝
rtp
:
  enabled
: true

  # Only choose players considered "active" (non-AFK) by PlayerActivity.
  # Uses movement/interaction + optional EssentialsX /afk integration.
  require-active
: true

  # Try to avoid teleporting to vanished players (common vanish metadata).
  skip-vanished
: true

  # Players with this permission will never be chosen as targets.
  skip-permission
: "playeractivity.rtp.exempt"

  # Minimum number of players online before RTP will choose someone.
  # This includes staff. With 2, you (staff) + 1 player is enough.
  min-online
: 2

  # If not empty, only worlds in this list are eligible for targets.
  # Example: ["world", "world_nether"]
  allowed-worlds
: [ ]

  # Targets in these worlds are NEVER chosen. Overrides allowed-worlds.
  disallowed-worlds
: [ ]

  # If true and EssentialsX is installed, the plugin will run Essentials'
  # /tp command for you. This respects /tptoggle, vanish protections, etc.
  use-essentials-tp
: true

  # Optional safety - if you implement command execution with a timeout,
  # this can be used. Currently not enforced by the core RTP logic, but
  # kept here in case you extend functionality.
  command-timeout-seconds
: 3

  # If true, each staff member cycles through all eligible players before
  # seeing a repeat. This prevents "same person every 3–4 teleports".
  unique-cycle
: true

  # If true, the unique cycle is reset when the eligible player pool changes
  # noticeably (joins/quits or world/AFK/vanish status changes).
  cycle-reset-on-joinquit
: true


# ╔══════════════════════════════════════════════════════════════╗
# ║  GENERAL MESSAGES & LOCALIZATION                             ║
# ╚══════════════════════════════════════════════════════════════╝
messages
:
  # /playeractivity reload
  reload
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &fThe &bconfig.yml &fhas been reloaded."

  # /playeractivity version
  version
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &fCurrent version: &b%version%"

  # Command tracker generic messages
  command-tracker
:
    disabled
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &fCommand tracker is &cdisabled&f."

  # /playeractivity cmdtop <daily|weekly|monthly> [limit]
  cmdtop
:
    # Shown when there is no data for the chosen period
    no-data
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &fNo command usage recorded for &b%period%&f."

    # Header above the list
    header
: "&fTop &6%limit% &fcommands &7(&b%period%&7):"

    # Each row in the list
    #   %rank%    - list position (1,2,3…)
    #   %command% - the command label (no slash)
    #   %count%   - how many times it was used
    entry
: "&b%rank%. &e/%command% &7— &b%count%"

    # Optional footer (set to "" to disable)
    footer
: ""

  # Random teleport messages (/playeractivity rtp)
  rtp
:
    disabled
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &fRandom teleport is &cdisabled&f."
    no-permission
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &fYou &cdon't &fhave permission to use this."
    not-player
: "&fOnly &eplayers &fcan use this command."
    not-enough-online
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &cNo eligible players &ffound. Try again later."
    searching
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &fSelecting a random player..."
    success
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &aTeleporting &fto &b%target%&f."
    failed
: "&eᴘʟᴀʏᴇʀᴀᴄᴛɪᴠɪᴛʏ &fTeleport &cfailed&f. Please try again."

  # Focused player listing (/playeractivity focuslist)
  focuslist
:
    no-permission
: "&cYou don't have permission to view the focus list."
    disabled
: "&cFocus tracking is not available."
    none
: "&eNo focused players are currently online."
    header
: "&6Focused players online (&e%count%&6):"
    #   %name%   - player name
    #   %status% - ACTIVE/IDLE text below
    #   %idle%   - idle time in minutes (approx)
    entry
: "&e%name% &7- %status% &8(%idle%m idle)"
    status-active
: "&aACTIVE"
    status-idle
: "&cIDLE"


# ╔══════════════════════════════════════════════════════════════╗
# ║  AFK DETECTION                                               ║
# ╚══════════════════════════════════════════════════════════════╝

# Minutes of inactivity before a player counts as AFK.
# Used both for activity graphs and for RTP "require-active" filtering.
afk-threshold-minutes
: 5


# ╔══════════════════════════════════════════════════════════════╗
# ║  COMMAND TRACKER                                             ║
# ╚══════════════════════════════════════════════════════════════╝
# Watches for specified commands being used on the server
# (players/console/blocks), counts usage (daily/weekly/monthly),
# optionally posts to Discord via webhook, and saves stats to YAML.
command-tracker
:
  # Master switch for the command tracker. If false: nothing
  # is recorded or sent.
  enabled
: true

  # ─────────────── WHICH COMMANDS TO TRACK ───────────────
  # Only commands listed here (or matched by include-regex) are tracked.
  # IMPORTANT:
  #  - Do NOT include the leading slash.
  #  - Matching is case-insensitive.
  #  - This matches the COMMAND LABEL only (not the arguments).
  include
:
   - "gamemode"     # tracks /gamemode
    - "ban"           # tracks /ban
    - "mute"         # tracks /mute

  # Use REGEX to track labels and aliases. (Still label only, not args.)
  # Examples:
  #  - ^gm(0|1|2|3)$  → matches gm0, gm1, gm2, gm3
  #  - ^tp$           → exactly /tp
  include-regex
:
   - "^gm(0|1|2|3)$"     # alias support for /gm0 .. /gm3
    - "^tp$"               # matches /tp

  # Exclusions OVERRIDE inclusions. Use this to ignore specific patterns.
  # Here we ignore anything that starts with "gamemode spectator ..."
  # Matching is done against the full input ("label + args"), case-insensitive.
  exclude
:
   - "gamemode spectator"

  # ─────────────── WHO TO TRACK ───────────────
  # Record commands sent from the server CONSOLE?
  track-console
: true

  # Record commands from command blocks?
  # (Some implementations treat block commands like console commands.)
  track-command-blocks
: false

  # Keep separate counts per executor (UUID for players, "CONSOLE" for console)?
  # true  → you can see which staff/player used a command most often.
  # false → only total-per-command is stored (no per-user breakdown).
  per-executor
: true

  # ─────────────── ARGUMENTS & PRIVACY ───────────────
  # Store the ARGUMENTS that follow the command label?
  # false → safer (no arguments saved).
  # true  → arguments saved; consider using redact-regex to hide sensitive data.
  store-args
: false

  # If store-args=true, any text matching these REGEX patterns will be replaced
  # with [REDACTED] before saving/sending (to protect secrets).
  # These examples redact things like "password: abc123" or "token=XYZ".
  redact-regex
:
   - "(?i)pass(word)?\\s*[:=]?\\s*\\S+"
    - "(?i)token\\s*[:=]?\\s*\\S+"

  # ─────────────── ROLLUPS & PERSISTENCE ───────────────
  # Default number of rows to show in leaderboards (e.g.,
  # /playeractivity cmdtop daily 10).
  top-n
: 10

  # How many days of DAILY buckets to keep in the data file.
  # Older daily entries are removed on flush.
  retention-days
: 30

  # How often (in minutes) the tracker writes data to disk.
  # Lower = more frequent writes (safer on crash, more IO).
  flush-minutes
: 3

  # File name where command usage is saved (inside the plugin’s data folder).
  file
: "command-usage.yml"

  # ─────────────── OPTIONAL: DISCORD WEBHOOK ───────────────
  # Sends a message each time a tracked command is used.
  webhook
:
    # Enable or disable per-use Discord notifications.
    # TIP: If you only want periodic leaderboards posted to Discord, keep
    #      this false and instead add a separate command that sends the
    #      top table on demand.
    enabled
: false

    # Your Discord Webhook URL (from the channel's Integrations > Webhooks).
    # Example: https://discord.com/api/webhooks/123456789/abcdef...
    url
: "https://discord.com/api/webhooks/xxx/yyy"

    # How each webhook message should look. Available placeholders:
    #   %executor%  → the player name or "CONSOLE"
    #   %command%   → the command label (e.g., gamemode, ban, tp)
    #   %args%      → the arguments string (blank unless store-args=true;
    #                 redacted by regex above)
    #   %world%     → world name (for player-run commands)
    #   %server%    → the Bukkit server name
    format
: "**%executor%** ran `/%command% %args%` in **%world%** (%server%)"


# ╔══════════════════════════════════════════════════════════════╗
# ║  FOCUS TRACKING (STAFF / WATCH LISTS)                        ║
# ╚══════════════════════════════════════════════════════════════╝
activity-tracking
:
  focus
:
    # Player names or UUIDs. Names are resolved to UUIDs for online players.
    # Example:
    #   players:
    #     - "SomePlayer"
    #     - "00000000-0000-0000-0000-000000000000"
    players
: [ ]

    # LuckPerms group names to automatically treat as "focused".
    # Requires LuckPerms to be present.
    # Example:
    #   groups:
    #     - "mod"
    #     - "helper"
    groups
: [ ]

  # Reserved for future behavior such as "graph only focused cohort".
  # Currently not enforced by the default graph command, but can be used
  # internally by other features or future updates.
  only-focus
: false

Support »
The quickest way to get support for any of my resources
would be to join my Resource Discord.
» https://discord.gg/2vUqykD

Note »
Please DO NOT leave bad reviews for any issues
that you have. Please simply PM me or leave it
in the discussion tab. Thank you. (y)

That and reviews are highly appreciated! :alien:

[​IMG]
Resource Information
Author:
----------
Total Downloads: 176
First Release: Aug 4, 2025
Last Update: Nov 16, 2025
Category: ---------------
All-Time Rating:
2 ratings
Find more info at discord.gg...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings