Skip to content

2.0.0

Choose a tag to compare

@dmccoystephenson dmccoystephenson released this 19 Sep 16:07
f17553a

2.0.0

Upgrading from 1.1 changes how line numbers work in /pl edit and /pl remove: lines are now counted from 1, so the first line of lore is 1, not 0, and any players or scripts that used the old zero-based numbers will hit a different line. This release also adds usage reporting, which is on by default: on startup and on each command the plugin sends its name, version and the command name to the author's trace server (nothing about players or the server). It can be turned off per plugin or server-wide, and the console says on startup whether it is on. The plugin will also write a new usage-reporting block into its config.yml and create plugins/trace/config.yml on first start.

Changes

Commands

  • /pl edit and /pl remove now take 1-based line indexes; index 0 and out-of-range indexes are rejected with a message instead of editing the wrong line or throwing (#9)
  • /pl edit and /pl remove reject a non-numeric index with "Line index must be a number." and show usage when no arguments are given, instead of throwing (#9)
  • /pl add with no arguments now shows a usage message instead of throwing (#15)
  • /pl now points to /pl help (was the typo /lp help) and to the wiki under Dans-Plugins (#9, #19)
  • /pl help now lists the bare /pl command (#26)

Usage reporting

  • Usage events (startup and command names) are reported to https://trace.danielstephenson.dev off the main thread, bounded and never blocking a tick; failures are dropped silently (#28)
  • Opt-out via usage-reporting.enabled: false in the plugin's config.yml, enabled: false in plugins/trace/config.yml for every trace-reporting plugin on the server, or the environment variables TRACE_USAGE_REPORTING=off / DO_NOT_TRACK=1 (#28, #30)
  • The console logs on startup whether reporting is on and, if off, why; the usage-reporting block is written into an existing config.yml so the switch is where the message says it is (#30)

Configuration

  • Removed leftover template branches in /pl config set that parsed the non-existent options A and C as numbers; every option other than version and debugMode is stored as a string (#19)

Housekeeping

  • Internal refactoring and alignment with DPC conventions (#4, #6, #17)
  • Unit tests for all commands and the config service (#11, #23, #27)
  • CI builds, rolling dev prereleases and release publishing (#18, #21, #29)

Upgrade notes

  • Tell players that /pl edit and /pl remove now count lines from 1. Anything that used 0 for the first line must be updated; 1 now targets the first line, not the second.
  • Usage reporting is enabled by default after upgrading. To turn it off for this plugin, set usage-reporting.enabled: false in plugins/PlayerLore/config.yml; to turn it off for every plugin that reports to trace, set enabled: false in plugins/trace/config.yml (created on first start); or set TRACE_USAGE_REPORTING=off or DO_NOT_TRACK=1 in the server's environment.
  • Expect a new usage-reporting block in plugins/PlayerLore/config.yml and a new plugins/trace/config.yml after the first start; existing values in either file are not overwritten.

Version

1.1 → 2.0.0 — MAJOR. Mechanical floor from comparing the two jars: MINOR.
Judgment: The floor of minor covers the new usage-reporting config keys, but the diff also changes the argument semantics of two existing commands: /pl edit and /pl remove switch from 0-based to 1-based line indexes (#9), so /pl remove 1 now removes a different line than it did in 1.1 and /pl remove 0 is rejected. That is an incompatible command-argument change the mechanical comparison cannot see, and it silently alters which lore line is edited or deleted for anyone using the old numbering. The pom already targets 2.0.0, consistent with this.

  • minor: default config key added: usage-reporting.enabled
  • minor: default config key added: usage-reporting.endpoint
  • minor: default config key added: usage-reporting.key
  • info: public class added: dansplugins.playerlore.trace.TraceClient
  • info: public class added: dansplugins.playerlore.trace.TraceClient$Builder
  • info: dansplugins.playerlore.services.ConfigService: added public boolean isUsageReportingEnabled();
  • info: dansplugins.playerlore.services.ConfigService: added public java.lang.String getUsageReportingEndpoint();
  • info: dansplugins.playerlore.services.ConfigService: added public java.lang.String getUsageReportingKey();
  • info: dansplugins.playerlore.services.ConfigService: added public void saveUsageReportingDefaultsIfNotPresent();

Verification

Booted twice on a real Spigot server before publication — boot gate run (8 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