Skip to content

2.0.0

Choose a tag to compare

@dmccoystephenson dmccoystephenson released this 23 Sep 01:17
92f7f5f

2.0.0

For a server on 1.1.0, this release closes a hole where any player could change the plugin's config with /nac config set, including turning off portal-creation enforcement. It also corrects the declared permission nodes from wac.* to nac.*, the names the plugin was already checking. Startup now fails safe: if the saved whitelist can't be read, the plugin denies everyone instead of letting everyone through. This release also adds anonymous usage reporting to the author's trace server, and it is on by default. It sends the plugin name, version and command names, and nothing about players or the server. On first start the plugin adds a usage-reporting block to your existing config.yml, and every startup logs whether reporting is on and how to turn it off.

Changes

Permissions and security

  • /nac config now requires nac.config. Before this, the permission check ran but its result was ignored, so any player could view and change config options (#38).
  • The permission nodes declared in plugin.yml are now nac.help, nac.list, nac.allow, nac.deny and nac.config. They match the nodes the commands actually check, and all still default to op (#31).
  • A player refused for a missing permission no longer gets the command's usage text after the refusal (#54).

Whitelist safety and save files

  • If allowedPlayers.json is empty, cut off or otherwise unreadable, the plugin still enables with an empty whitelist, so nobody can use the nether. Before, it could fail to enable and leave every portal open (#44).
  • An unreadable save file is renamed to allowedPlayers.json.unreadable so the save at shutdown doesn't overwrite it. If that name is taken, the plugin uses .unreadable.2, .unreadable.3 and so on, so older copies are never replaced (#44, #48).
  • If config.yml has no version key, the plugin now rewrites the missing defaults instead of failing to start (#44).

Configuration

  • /nac config set now accepts only true or false for true/false options. Before, a typo such as yes or ture was silently stored as false, which could turn off enforcement (#47).
  • /nac config show now shows debugMode as true/false and includes the usage-reporting.enabled setting (#47, #51).

Usage reporting

  • New anonymous usage reporting: one event at startup and one each time a command is used. It runs in the background, never delays the server, and drops the event quietly if the trace server can't be reached (#51).
  • Ways to turn it off: set usage-reporting.enabled: false in this plugin's config.yml; set enabled: false in plugins/trace/config.yml to turn it off for every plugin that reports to trace; or set TRACE_USAGE_REPORTING=off or DO_NOT_TRACK=1 on the server process. Each startup logs whether reporting is on, or why it is off (#51, #53).

Command output

  • /nac with no arguments and /nac list are no longer treated as misuse, so they don't print usage text after their output (#48).

Upgrade notes

  • If your permissions plugin grants or denies wac.help, wac.list, wac.allow, wac.deny or wac.config, change those entries to the matching nac.* names. The wac.* nodes never controlled the commands.
  • Non-op players who used /nac config will now be refused unless you grant them nac.config.
  • Usage reporting is on by default. To turn it off, set usage-reporting.enabled: false in plugins/NetherAccessController/config.yml, or set enabled: false in plugins/trace/config.yml for all plugins that report to trace. The first start on this version creates the plugins/trace/config.yml file.
  • If startup logs that allowedPlayers.json was renamed to .unreadable, nobody can use the nether until you rebuild the whitelist with /nac allow or repair the file and put it back.

Version

1.1.0 → 2.0.0 — MAJOR. Mechanical floor from comparing the two jars: MAJOR.
Judgment: I kept the mechanical floor of major. The five permission nodes declared in plugin.yml were renamed from wac.* to nac., which on its own is breaking for anyone whose permission setup names them. The command code checked nac. before and after this change, so the declared wac.* nodes never controlled anything. Separately, #38 now enforces nac.config on /nac config, where before this release any player could run it, including config set. That changes what non-op players can do, and #51 turns on outbound usage reporting by default. The one file cut from the diff is TraceClientTest.java, a test that cannot affect data, commands or config.

  • major: permission removed: wac.allow
  • major: permission removed: wac.config
  • major: permission removed: wac.deny
  • major: permission removed: wac.help
  • major: permission removed: wac.list
  • minor: permission added: nac.allow
  • minor: permission added: nac.config
  • minor: permission added: nac.deny
  • minor: permission added: nac.help
  • minor: permission added: nac.list
  • 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/netheraccesscontroller/data/PersistentData.java
  • minor: storage path changed: src/main/java/dansplugins/netheraccesscontroller/services/StorageService.java
Java API changes (informational — nothing depends on this plugin)
  • public class added: dansplugins.netheraccesscontroller.trace.TraceClient
  • public class added: dansplugins.netheraccesscontroller.trace.TraceClient$Builder
  • dansplugins.netheraccesscontroller.services.ConfigService: added public boolean isUsageReportingEnabled();
  • dansplugins.netheraccesscontroller.services.ConfigService: added public java.lang.String getUsageReportingEndpoint();
  • dansplugins.netheraccesscontroller.services.ConfigService: added public java.lang.String getUsageReportingKey();

Verification

Verified on a real Spigot server before publication; this release carries the exact jar that was verified.

  • boot gate run: booted twice on a fresh Spigot server (10 assertions passed).
  • save-compatibility gate run: data written by 1.1.0 was loaded by this release across two restarts with nothing lost (16 assertions passed).

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


drafted by Claude on behalf of Daniel Stephenson