Skip to content

1.4.0

Choose a tag to compare

@dmccoystephenson dmccoystephenson released this 19 Sep 16:48
444c4ad

1.4.0

This release is a drop-in upgrade for a server running 1.3.0: the activity data on disk is unchanged and every existing command keeps working. Two things are new on startup that you should know about. Usage reporting is on by default — the plugin sends its name, version and the names of commands used (nothing about players or the server) to the author's trace server, and it says so in the console on every start; turn it off with usage-reporting.enabled: false in the plugin's config.yml or for every trace-reporting plugin at once in the new plugins/trace/config.yml. Optional Discord join/quit notifications, a /at average command, an admin /at list command, a /at top player count, and a matching REST endpoint round out the release.

Changes

Usage reporting

  • The plugin reports one event on startup and one per command to the author's trace server, off the main thread, never blocking a tick, and dropped silently if the server is unreachable; a bounded queue keeps an unreachable server from costing memory. (#99)
  • A console line on every startup states whether reporting is on, what is sent, and how to turn it off. Opt out per plugin with usage-reporting.enabled: false, server-wide with enabled: false in plugins/trace/config.yml (created on first start, never turned back on by a plugin), or process-wide with the TRACE_USAGE_REPORTING=off or DO_NOT_TRACK=1 environment variables. (#99, #101)

Discord notifications

  • Player join and quit events can be posted to a Discord webhook. Off by default; enable with discordWebhookEnabled: true and discordWebhookUrl. Messages are templated via discordWebhookJoinMessage and discordWebhookQuitMessage ({player} is replaced with the player's name), and discordWebhookStaffOnly: true limits notifications to players holding the new at.staff permission. Sending happens asynchronously. (#77)

Commands

  • New /at average [player] [days] shows a player's total and average hours per day over the last N days (default 7), with permission at.average (default: everyone). (#69)
  • New /at list shows the 10 most recent sessions across all players, with permission at.list (default: op). (#59)
  • /at top accepts an optional number of players to show, from 1 to 100 (default 10). (#83)
  • /at info now shows the player's activity ranking against all tracked players. (#76)
  • All command output uses a consistent boxed format with colour and progress bars; /at help and /at config list the new commands and keys. (#76)
  • The bare /at command now checks the at.default permission, which is declared with default true. (#96)
  • The /at version header no longer shows a doubled v prefix. (#98)

REST API

  • New GET /api/average-daily-activity/{uuid}?days=N returns average and total hours for a player over the period, documented in openapi.yaml. (#69)

Upgrade notes

  • Decide whether you want usage reporting. It is on unless you turn it off: set usage-reporting.enabled: false in plugins/ActivityTracker/config.yml, or set enabled: false in plugins/trace/config.yml to switch it off for every plugin that reports to trace. The console notice on startup confirms the current state.
  • plugins/trace/config.yml is created on first start if it does not exist. This is expected.
  • New config keys are written to config.yml on first start: usage-reporting.enabled, usage-reporting.endpoint, usage-reporting.key, discordWebhookEnabled, discordWebhookUrl, discordWebhookStaffOnly, discordWebhookJoinMessage, discordWebhookQuitMessage. Existing keys and values are preserved.
  • New permissions: at.default (default true) gates the bare /at command; at.average (default true); at.list (default op); at.staff (default op) marks staff for staff-only Discord notifications. If your permissions plugin denies permissions that are not explicitly granted, grant at.default and at.average to players who should keep using /at.
  • If you run the REST API, the new endpoint is exposed on the same port and needs no configuration.

Version

1.3.0 → 1.4.0 — MINOR. Mechanical floor from comparing the two jars: MINOR.
Judgment: Nothing in the diff meets the major criteria: the on-disk activity data format is untouched (PersistentData only gains a read-only getPlayerRank), no existing command changes its arguments or behaviour incompatibly (/at top gains an optional argument, /at info gains a line), no existing config key changes meaning, and the newly declared at.default permission defaults to true so the /at check it now enforces does not lock out anyone who could run it before. The notable changes are additive: usage reporting to the author's trace server (on by default with an opt-out and a new plugins/trace/config.yml written on first start), Discord join/quit webhooks (off by default), /at average, /at list, a new REST endpoint, and new permissions and config keys. The changed JoinHandler/QuitHandler constructors and sendInfoToSender signature are internal plugin classes rather than an API other plugins consume, and the mechanical check already rated them INFO, so the floor of minor is kept.

  • minor: permission added: at.average
  • minor: permission added: at.default
  • minor: permission added: at.list
  • minor: permission added: at.staff
  • minor: default config key added: usage-reporting.enabled
  • minor: default config key added: usage-reporting.endpoint
  • minor: default config key added: usage-reporting.key
  • minor: storage path changed: src/main/java/dansplugins/activitytracker/api/RestApiService.java
  • minor: storage path changed: src/main/java/dansplugins/activitytracker/data/PersistentData.java
  • minor: storage path changed: src/main/java/dansplugins/activitytracker/objects/ActivityRecord.java
  • minor: storage path changed: src/main/java/dansplugins/activitytracker/services/ActivityRecordService.java
Java API changes (informational — nothing depends on this plugin)
  • public class added: dansplugins.activitytracker.api.AverageDailyActivityResponse
  • public class added: dansplugins.activitytracker.commands.AverageCommand
  • public class added: dansplugins.activitytracker.commands.ListCommand
  • public class added: dansplugins.activitytracker.services.DiscordWebhookService
  • public class added: dansplugins.activitytracker.trace.TraceClient
  • public class added: dansplugins.activitytracker.trace.TraceClient$Builder
  • dansplugins.activitytracker.data.PersistentData: added public int getPlayerRank(java.util.UUID);
  • dansplugins.activitytracker.eventhandlers.JoinHandler: removed/changed public dansplugins.activitytracker.eventhandlers.JoinHandler(dansplugins.activitytracker.services.ActivityRecordService, dansplugins.activitytracker.data.PersistentData, dansplugins.activitytracker.factories.SessionFactory);
  • dansplugins.activitytracker.eventhandlers.JoinHandler: added public dansplugins.activitytracker.eventhandlers.JoinHandler(dansplugins.activitytracker.services.ActivityRecordService, dansplugins.activitytracker.data.PersistentData, dansplugins.activitytracker.factories.SessionFactory, dansplugins.activitytracker.services.DiscordWebhookService, org.bukkit.plugin.java.JavaPlugin);
  • dansplugins.activitytracker.eventhandlers.QuitHandler: removed/changed public dansplugins.activitytracker.eventhandlers.QuitHandler(dansplugins.activitytracker.data.PersistentData, dansplugins.activitytracker.utils.Logger);
  • dansplugins.activitytracker.eventhandlers.QuitHandler: added public dansplugins.activitytracker.eventhandlers.QuitHandler(dansplugins.activitytracker.data.PersistentData, dansplugins.activitytracker.utils.Logger, dansplugins.activitytracker.services.DiscordWebhookService, org.bukkit.plugin.java.JavaPlugin);
  • dansplugins.activitytracker.objects.ActivityRecord: removed/changed public void sendInfoToSender(org.bukkit.command.CommandSender);
  • dansplugins.activitytracker.objects.ActivityRecord: added public void sendInfoToSender(org.bukkit.command.CommandSender, int, int);
  • dansplugins.activitytracker.services.ActivityRecordService: added public double calculateAverageDailyActivity(dansplugins.activitytracker.objects.ActivityRecord, int);
  • dansplugins.activitytracker.services.ActivityRecordService: added public double calculateTotalHoursInPeriod(dansplugins.activitytracker.objects.ActivityRecord, int);
  • dansplugins.activitytracker.services.ActivityRecordService: added public java.util.ArrayList<dansplugins.activitytracker.objects.ActivityRecord> getTopRecords(int);
  • dansplugins.activitytracker.services.ConfigService: added public boolean isUsageReportingEnabled();
  • dansplugins.activitytracker.services.ConfigService: added public java.lang.String getUsageReportingEndpoint();
  • dansplugins.activitytracker.services.ConfigService: added public java.lang.String getUsageReportingKey();

Verification

Booted twice on a real Spigot server before publication — boot gate run (10 assertions passed). This release carries the exact jar that was verified.

Install with Dan's Plugin Manager: /dpm get <plugin>. How stable releases are made: Release channels.


drafted by Claude on behalf of Daniel Stephenson