Skip to content

Replace raw boolean in flight-toggle message with readable wording - #12

Merged
dmccoystephenson merged 1 commit into
mainfrom
feature/readable-flight-toggle-message
Aug 30, 2026
Merged

Replace raw boolean in flight-toggle message with readable wording#12
dmccoystephenson merged 1 commit into
mainfrom
feature/readable-flight-toggle-message

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • The /fly confirmation message no longer concatenates the boolean returned by getAllowFlight(). The post-toggle state is selected in words, so Flight enabled. or Flight disabled. is shown instead of Flight toggled to true / Flight toggled to false.
  • A ### Changed bullet recording the new wording was added under ## [Unreleased] in CHANGELOG.md, since the message is user-visible output.

No other behaviour was altered: the console guard, the permission check, the permission node, the command label, and every return value are untouched.

Validation

Mechanical checks (run, output read)

Check Output Verdict
grep -n '^main:' plugin.yml main: me.Daniel.FlyCommand.Main PASS — equals <package>.<class> below and matches me/Daniel/FlyCommand/Main.java on disk
grep -n '^package ' me/Daniel/FlyCommand/Main.java package me.Daniel.FlyCommand; PASS
grep -n 'public class ' me/Daniel/FlyCommand/Main.java public class Main extends JavaPlugin { PASS
grep -rn 'hasPermission(' me/Daniel/FlyCommand/Main.java player.hasPermission("FlyCommand.fly") PASS — single node, unchanged by this PR
grep -n 'FlyCommand.fly' plugin.yml USER_GUIDE.md COMMANDS.md declared in all three PASS
grep -n 'equalsIgnoreCase(' me/Daniel/FlyCommand/Main.java label.equalsIgnoreCase("fly") PASS — commands: still declares the Fly key
python3 -c "import yaml; yaml.safe_load(open('plugin.yml'))" plugin.yml parses PASS

CI is reported for completeness only. .github/workflows/build.yml contains a single actions/checkout@v4 step and zero run: steps, so a green check confirms only that the repository could be checked out. It is not verification of anything in this diff, and it is not being treated as such (see #9).

On-server reproduction recipe (UNVERIFIED here)

Nothing in this repository can compile or run the plugin, so the changed message has not been executed. The following must be carried out by a human before merge:

  1. Build the jar as documented in README.md § Building, against a Spigot API jar for Minecraft 1.13 or newer, at a release level the target server's runtime can load.
  2. Place FlyCommand.jar in a Spigot or Paper server's plugins/ folder and start the server.
  3. Join as an operator (thereby holding FlyCommand.fly, whose declared default is op) and run /fly.
    • Before this change: Flight toggled to true
    • After this change: Flight enabled. — and flight is actually granted.
  4. Run /fly a second time.
    • Before this change: Flight toggled to false
    • After this change: Flight disabled. — and flight is actually revoked.
  5. Join with an account that is neither an operator nor a holder of FlyCommand.fly and run /fly; the alert Alert: Permission 'FlyCommand.fly' required. must still be the only message shown.
  6. Run /fly from the server console; Alert: Can't be used by console. must still be shown and no error logged.

Deferred work

#9 (no build system, checkout-only CI) was left untouched this cycle. It is a charter-level change to the declared stack — adding a build file, relocating the source tree, and amending agent-loaded guidance — and maintainer authorization is required before it is started.

Closes #8


This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

The confirmation shown after /fly concatenated the boolean returned by
getAllowFlight(), so players saw "Flight toggled to true" or
"Flight toggled to false". The post-toggle state is now selected in
words: "Flight enabled." or "Flight disabled."

Closes #8

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review

A reviewer was requested from Copilot and could not be resolved (GraphQL: Could not resolve user with login 'copilot'), so the rubric below was run in its place. This is a self-review, not an independent one.

Rubric

  • Scope: PASSgit diff --name-only origin/main...HEAD lists exactly CHANGELOG.md and me/Daniel/FlyCommand/Main.java; git diff --stat reports 9 insertions and 1 deletion. Both files are required by Flight-toggle message prints a raw boolean #8 (the fix, and the record of a user-visible message change). No reformatting of the surrounding tab-indented, CRLF-terminated source was introduced.
  • Validation-new: PASS — the changed behaviour is covered by the six-step on-server recipe in the PR body, which names the API level, the build step, the exact commands, the permission the test account holds, and the expected message before and after in both toggle directions.
  • Validation-fix: UNVERIFIED — the checkout-based revert experiment was run and does report the defect: with git checkout origin/main -- me/Daniel/FlyCommand/Main.java applied, grep -n 'Flight toggled to' printed 31: player.sendMessage("Flight toggled to " + player.getAllowFlight()); and grep -c 'Flight enabled' printed 0; after git checkout HEAD --, the first grep printed nothing and lines 32 and 35 carry Flight enabled. and Flight disabled.. That establishes the string change only. It cannot establish that the word shown corresponds to the post-toggle flight state, because nothing in this repository compiles or runs Java (No automated verification exists: no build system, and CI is checkout-only #9). The runtime behaviour is handed to a human with the recipe above.
  • Sibling structure: no signal this cycle — no file was created.
  • Sibling renames: no signal this cycle — no identifier was renamed.
  • Docs: PASS — every row of the documentation sources-of-truth table was re-checked against the head of this branch. plugin.yml is untouched and still resolves; USER_GUIDE.md and README.md describe the confirmation generically ("confirm the new state in chat"), which remains true of the new wording; COMMANDS.md documents the command and node, neither of which changed; CONFIG.md's claim that there is no config.yml and that behaviour is governed by the plugin.yml permissions still holds; CHANGELOG.md gains a ### Changed bullet under ## [Unreleased].
  • Issue resolution: PASSFlight-toggle message prints a raw boolean #8 names player.sendMessage("Flight toggled to " + player.getAllowFlight()); as the defect, and that exact line is what the diff replaces. Nothing else in Flight-toggle message prints a raw boolean #8 is left outstanding.
  • Manual validation: PARTIAL / UNVERIFIED where it matters — the mechanical checks quoted in the PR body were run and read, and all agree. gh pr checks 12 reports build pass 5s, which is scored as no verification: build.yml holds one actions/checkout@v4 step and zero run: steps, so it cannot fail on anything in this diff. The behavioural item of the checklist is not executable here and is recorded UNVERIFIED, never PASS.
  • Manifest declaration: PASSgrep -rn 'hasPermission(' yields only FlyCommand.fly, declared in plugin.yml under permissions: with default: op, matching the op recorded in USER_GUIDE.md's table.
  • Command declaration: PASSgrep -n 'equalsIgnoreCase(' yields only label.equalsIgnoreCase("fly"), and commands: declares the Fly key.
  • Main-class resolution: PASSmain: me.Daniel.FlyCommand.Main equals package me.Daniel.FlyCommand plus public class Main, and matches me/Daniel/FlyCommand/Main.java on disk.
  • Override annotations: PASSonEnable, onDisable, and onCommand all still carry @Override; none was touched.
  • No stack change: PASS — no pom.xml, build.gradle, or src/main/java path appears in the diff, and grep -n 'import ' shows only the four pre-existing org.bukkit.* imports.
  • Changelog: PASS — the new bullet sits under ## [Unreleased]### Changed, in Keep a Changelog form, and is placed above the existing ### Fixed section.
  • No harness leakage: PASSgit diff --name-only origin/main...HEAD lists no .claude/ path. Staging was done by explicit filename; the two scratch files used for the commit message and the PR body were written into the tree and removed before the push and after the create respectively.

Observations folded in from the diff

  • me/Daniel/FlyCommand/Main.java:31-36 — the branch is taken on getAllowFlight() after setAllowFlight has been called, so the message reports the state the server actually settled on rather than the state that was requested. That is the intended reading of Flight-toggle message prints a raw boolean #8's "chosen from the post-toggle value", and it is more honest than reporting the requested value, but it is worth a reviewer's attention: if some other plugin were ever to veto the change, the message would follow the server rather than the command.
  • me/Daniel/FlyCommand/Main.java:32,35 — the two new messages carry no Alert: prefix, unlike the console alert and the permission alert. This matches the unprefixed confirmation that was there before, so no new inconsistency is introduced; a broader message-prefix or colour convention remains unaddressed and was deliberately left out of scope.
  • USER_GUIDE.md:15 and README.md:19 describe the confirmation only as "the new state", so neither contradicts the new wording and neither states it. Pinning the exact strings in the user-facing docs is a judgement call rather than a correctness gap, and would widen this PR beyond Flight-toggle message prints a raw boolean #8; it is left for a maintainer to direct.

Merge posture

One do-not-auto-merge path is matched: me/Daniel/FlyCommand/Main.java, the only executable code in the repository and unverifiable anywhere in this loop's reach. Merge authorization was not granted to this session in any case. The pull request is therefore left open for human review, and the blocking condition is specifically no executable verification exists (#9) — not merely "awaiting review".


This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 58ea603 into main Aug 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flight-toggle message prints a raw boolean

1 participant