Skip to content

Release 1.8.0#421

Open
tastybento wants to merge 50 commits into
masterfrom
develop
Open

Release 1.8.0#421
tastybento wants to merge 50 commits into
masterfrom
develop

Conversation

@tastybento

Copy link
Copy Markdown
Member

Release 1.8.0 — merges develop into master. (build.version bumped 1.7.0 → 1.8.0; 1.7.0 was released 2026-07-01.)

✨ Features

🐛 Fixes

🧰 Internal

  • Added tests covering item/block/entity/money/XP consumption on completion (Unit Tests #111)
  • CI: pinned reusable workflow / publish-platforms bumps
  • Dev docs: refreshed dependency versions in CLAUDE.md

Full release notes to follow.

tastybento and others added 30 commits June 30, 2026 23:15
…e4b1f0

ci: bump pinned reusable workflow to fe4b1f0
…ca2dcd1

ci: bump pinned publish-platforms.yml to ca2dcd1
The player panel only checked the global
remove-complete-one-time-challenges setting; the per-challenge
"remove when completed" flag set in the admin editor was never
consulted, so it silently did nothing.

Fixes #337

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
New gui-settings option (default off) that skips only the
location-on-island check when opening /challenges. Completion checks
in TryToComplete are unchanged, so island protection still applies
when actually completing challenges.

Fixes #349

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Normal completion via TryToComplete validated level completion after
marking a challenge complete, but the admin command and admin GUI
called setChallengeComplete directly, so a level whose last challenge
was admin-completed never registered as complete.

Fixes #385

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Honour per-challenge removeWhenCompleted flag in player GUI
Add setting to open the challenges GUI while off-island
…el-check

Run level-completion check when challenges are completed by admins
When a potion material was in the ignore-metadata list, items were
matched by Material alone, so any potion matched any other potion and
removal could consume the wrong ones. Now potion-like items
(POTION, SPLASH_POTION, LINGERING_POTION, TIPPED_ARROW) still compare
their base PotionType while ignoring other metadata.

Fixes #320

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Covers the removal checklist from #111: items taken (and not taken),
block and entity removal for island challenges, money/XP consumption in
the full completion flow, and that nothing is consumed when a
requirement fails.

Tests added:
- testInventoryChallengeWithTakeItemsTrue: verifies items removed when takeItems=true
- testInventoryChallengeWithTakeItemsFalse: verifies items NOT removed when takeItems=false
- testInventoryChallengeMultipleItemsRemoved: verifies multiple item types removed correctly
- testIslandChallengeWithRemoveBlocksTrue: verifies blocks set to AIR when removeBlocks=true
- testIslandChallengeWithRemoveBlocksFalse: verifies blocks NOT removed when removeBlocks=false
- testIslandChallengeWithRemoveEntitiesTrue: verifies entities removed when removeEntities=true
- testIslandChallengeWithRemoveEntitiesFalse: verifies entities NOT removed when removeEntities=false
- testOtherChallengeMoneyWithdrawn: verifies money withdrawn when takeMoney=true
- testOtherChallengeMoneyNotWithdrawn: verifies money NOT withdrawn when takeMoney=false
- testOtherChallengeExperienceWithdrawn: verifies XP taken when takeExperience=true
- testOtherChallengeExperienceNotWithdrawn: verifies XP NOT taken when takeExperience=false
- testInventoryChallengeFailureDoesNotRemoveItems: verifies no items removed on requirement failure
- testIslandChallengeBlockRemovalFailureDoesNotRemoveBlocks: verifies no blocks removed on failure
- testIslandChallengeEntityRemovalFailureDoesNotRemoveEntities: verifies no entities removed on failure
- testOtherChallengeFailureDoesNotWithdrawMoney: verifies no money withdrawn on failure
- testOtherChallengeFailureDoesNotWithdrawExperience: verifies no XP taken on failure
- testMultipleInventoryItemsPartialRemovalFailure: verifies no items removed if any item requirement fails

Part of #111

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Fixes #352

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Challenges and challenge levels can now grant island levels on
completion (rewardIslandLevel / repeatIslandLevel, default 0). Applied
only when the Level addon is present. Repeat rewards multiply by the
completion factor, consistent with money and XP.

Fixes #279

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
New rewardChance percentage on challenges (default 100, so nothing
changes for existing data). For first-time completion one roll gates
the item, money, and XP rewards together; repeat completions roll once
per completion instance. Reward commands and completion state are
never gated.

Fixes #76

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Add challenge completion percentage placeholders
Add tests verifying consumption/removal on challenge completion
Remove the always-false inventory null check (User#getInventory is
non-null for players), use Stream.toList(), use pattern-matching
instanceof in Utils, and drop an unused test variable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Extract the three identical island-level reward blocks into a single
rewardIslandLevel() helper. This also fixes the reward being applied
once per team member: the island is shared, so it is now applied once
per completion, outside the recipient loops.

Exclude the Gson data objects from copy-paste detection: their
accessors are intentionally identical bean boilerplate across
Challenge, ChallengeLevel and ChallengesPlayerData.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Translate the new challenges.gui.buttons.reward_chance strings into
cs, de, es, fr, hu, ja, lv, pl, pt, ru, uk, zh-CN, zh-HK and zh-TW,
matching each file's existing formatting style.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Keep both the #320 potion tests and the #111 consumption tests in
TryToCompleteTest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
…data

Compare base potion type when metadata is ignored
Combine the island-level reward tests with the #320 potion tests and
#111 consumption tests in TryToCompleteTest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Add island level rewards via the Level addon
Resolve overlaps with the island level reward feature (#411): both
GUI buttons kept (reward chance at slot 37, island level at 38), both
copy() lines and helper methods kept, and all test groups combined.
The reward chance gates item/money/XP rewards; island level rewards,
like commands, are not gated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Add optional per-challenge reward chance
generateLevelDescription() fell back to the level's unlock
("Congratulations...") message as the lore description regardless of
whether the level was unlocked, so a locked level showed the congrats
text while its status read "locked / N challenges to go".

Gate the fallback on levelStatus.isUnlocked() so a locked level keeps
its status text and only unlocked levels show the unlock message.

Added CommonPanelTest coverage asserting getUnlockMessage() is not
consulted for a locked level and is for an unlocked one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
The confirmation conversation only accepts specific words (confirm /
cancel / ...) but the prompt never said so, so players didn't know they
had to type "confirm" in chat.

createConfirmation() now appends a locale-driven instruction line to the
question via a new confirm-instruction locale string, so every
confirmation (import, reset, wipe, ...) tells the player what to type.
Translators can localise the sentence and their own confirm/deny words.

Extracted the assembly into ConversationUtils.appendConfirmationInstruction
and added JUnit coverage for both the appended and empty-locale cases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
The include-undeployed setting (whether undeployed challenges count
towards level completion) existed in Settings and the admin GUI but was
missing from the shipped config.yml, so admins couldn't discover it
without reading the source.

Add it to config.yml with a description, and fix the "undepolyed" typo
and clarify the wording in the Settings ConfigComment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Fix #323: hide level unlock message on locked levels
tastybento and others added 10 commits July 10, 2026 17:15
Improve #329: tell players how to answer confirmation prompts
…d-config

Add include-undeployed to shipped config.yml (#179)
The undeployed-view-mode setting had a TOGGLEABLE option that was never
implemented: selecting it behaved exactly like VISIBLE because the player
panel only filtered undeployed challenges in HIDDEN mode.

Finish it: in TOGGLEABLE mode the player GUI now shows a button (in the
free-challenges row) that each player uses to show or hide undeployed
challenges for themselves. The preference defaults to shown, so
TOGGLEABLE starts out like VISIBLE, and the challenge/level lists are
filtered through a single hideUndeployedChallenges() helper that covers
both HIDDEN and TOGGLEABLE-hidden.

- ChallengesPanel: showUndeployed session field, hideUndeployedChallenges()
  helper used by both list builders, and createToggleUndeployedButton
  (returns no button outside TOGGLEABLE mode).
- main_panel.yml: TOGGLE_UNDEPLOYED button slot.
- en-US.yml: button name + shown/hidden state strings.
- config.yml / Settings: document TOGGLEABLE instead of "not implemented".
- ChallengesPanelTest: HIDDEN removes, TOGGLEABLE-shown keeps,
  TOGGLEABLE-hidden removes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Reimplements the useful part of the closed PR #340 in a way that fits the
current pipeline. Setting a default colour saves admins from prefixing
every challenge's description/reward text with the same colour code.

Two new gui-settings, both empty by default (no change):
- description-color: colour applied to each line of a challenge's own
  description text.
- reward-text-color: colour applied to each line of a challenge's own
  first-time and repeat reward text.

The colour is applied per line (so multi-line text stays coloured on
every lore line) before Util.translateColorCodes, so it uses the same
'&' / hex codes as the challenge text itself; a colour written in the
text still overrides the default. Only the challenge's own data-field
text is affected, not per-challenge locale overrides.

The lore-length line-wrapping half of #340 is intentionally left out: it
was built on legacy ChatColor wrapping incompatible with MiniMessage, its
default reintroduced the space-less-language issues it was removed for,
and the panel already wraps reward text via wrapToWidth().

Adds Utils.applyDefaultColor with JUnit coverage (blank/empty handling,
single/multi-line, blank-line preservation, hex colours).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
…oyed

Implement TOGGLEABLE undeployed view mode (#175)
Add default colour for challenge description and reward text
Island challenges can now require the player to be standing in one of a
set of biomes when they complete the challenge, so admins can build
exploration-style challenges that reward changing biomes.

- IslandRequirements: new requiredBiomes set, stored as namespaced key
  strings (e.g. "minecraft:plains") so serialization is version-robust
  (Biome is a registry-backed type now) and unknown biomes simply never
  match. Included in copy(); no adapter or migration needed.
- TryToComplete.checkSurrounding: gates completion on the player's
  current biome when requiredBiomes is set, with a wrong-biome message.
- MultiBiomeSelector: a paged biome picker built on UnifiedMultiSelector,
  enumerating Registry.BIOME with rough per-biome icons.
- EditChallengePanel: REQUIRED_BIOMES button in the island requirements
  menu (left-click to add, right-click to clear).
- CommonPanel: shows required biomes in the challenge lore.
- Utils.prettifyBiome turns "minecraft:snowy_taiga" into "Snowy Taiga".
- Locale keys + tests (TryToComplete biome gate, prettifyBiome).

Implemented as an option on island challenges (as the issue requested)
rather than a whole new challenge type, keeping it simple.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
- S1192: extract the duplicated "click-to-add" literal into
  Constants.CLICK_TO_ADD and use it in all three spots.
- S6204: MultiBiomeSelector.getElements collects with
  toCollection(ArrayList::new) — the list must stay mutable because
  UnifiedMultiSelector's constructor sorts it in place (Stream.toList()
  would be immutable and throw at runtime).
- S7158: use StringBuilder.isEmpty() in Utils.prettifyBiome.
- S6541: keep the biome button out of the already-oversized
  createIslandRequirementButton "brain method" entirely — dispatch
  REQUIRED_BIOMES straight to a self-contained createBiomeRequirementButton
  from the outer switch, leaving the island method unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Add biome requirement to island challenges (#335)
- Bump build.version 1.7.0 -> 1.8.0 (1.7.0 is already released).
- CLAUDE.md: correct stale dependency facts (Paper 1.21.11-R0.1-SNAPSHOT,
  BentoBox 3.14.0; note addon.yml api-version 3.12.0).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Release 1.8.0 merge bringing multiple player/admin GUI, challenge-completion, and configuration enhancements into master, alongside expanded test coverage and updated release tooling/docs.

Changes:

  • Added new challenge mechanics and settings: per-challenge reward chance, island level rewards (Level addon), biome requirements for island challenges, and “open GUI anywhere”.
  • Completed/extended GUI behavior: toggleable undeployed-challenge view mode, default lore text colors, and improved confirmation prompts.
  • Added/updated placeholders and expanded automated tests (including consumption/removal scenarios and GUI filtering).

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/test/java/world/bentobox/challenges/utils/UtilsTest.java Adds unit tests for default-color application and biome prettification helpers.
src/test/java/world/bentobox/challenges/tasks/TryToCompleteTest.java Adds extensive tests for reward chance, biome requirement, island-level rewards, potion ignore-metadata behavior, and consumption/removal.
src/test/java/world/bentobox/challenges/panel/user/ChallengesPanelTest.java New tests for “remove when completed” and undeployed-visibility filtering behavior in the user panel.
src/test/java/world/bentobox/challenges/panel/ConversationUtilsTest.java Adds tests ensuring confirmation instructions are appended when present.
src/test/java/world/bentobox/challenges/panel/CommonPanelTest.java Adds tests ensuring locked levels don’t leak unlock (“Congratulations”) lore.
src/test/java/world/bentobox/challenges/commands/ChallengesCommandTest.java Adds tests for open-anywhere allowing GUI access off-island under protection.
src/test/java/world/bentobox/challenges/ChallengesAddonTest.java Adds tests asserting new placeholders are registered.
src/main/resources/panels/main_panel.yml Adds a toggle button slot for TOGGLEABLE undeployed-view-mode.
src/main/resources/locales/zh-TW.yml Adds locale entries for reward chance.
src/main/resources/locales/zh-HK.yml Adds locale entries for reward chance.
src/main/resources/locales/zh-CN.yml Adds locale entries for reward chance.
src/main/resources/locales/uk.yml Adds locale entries for reward chance.
src/main/resources/locales/ru.yml Adds locale entries for reward chance.
src/main/resources/locales/pt.yml Adds locale entries for reward chance.
src/main/resources/locales/pl.yml Adds locale entries for reward chance.
src/main/resources/locales/lv.yml Adds locale entries for reward chance.
src/main/resources/locales/ja.yml Adds locale entries for reward chance.
src/main/resources/locales/hu.yml Adds locale entries for reward chance.
src/main/resources/locales/fr.yml Adds locale entries for reward chance.
src/main/resources/locales/es.yml Adds locale entries for reward chance.
src/main/resources/locales/en-US.yml Adds biome selector strings, undeployed toggle strings, reward chance/island level strings, open-anywhere strings, and confirm-instruction/wrong-biome.
src/main/resources/locales/de.yml Adds locale entries for reward chance.
src/main/resources/locales/cs.yml Adds locale entries for reward chance.
src/main/resources/config.yml Documents/ships open-anywhere, default text colors, and include-undeployed; updates TOGGLEABLE docs.
src/main/java/world/bentobox/challenges/utils/Utils.java Adds potion-like base-type comparison, biome prettification, and default-color lore prefixing.
src/main/java/world/bentobox/challenges/utils/Constants.java Adds new constants for click-to-add and confirm-instruction keys.
src/main/java/world/bentobox/challenges/tasks/TryToComplete.java Implements reward-chance gating, island-level rewards, biome requirement checks, level-completion refactor, and potion-aware ignore-metadata matching.
src/main/java/world/bentobox/challenges/panel/util/MultiBiomeSelector.java New biome multi-selector backed by the biome registry with heuristic icons and prettified names.
src/main/java/world/bentobox/challenges/panel/user/ChallengesPanel.java Implements TOGGLEABLE undeployed filtering and adds a per-session “toggle undeployed” button.
src/main/java/world/bentobox/challenges/panel/ConversationUtils.java Appends localized “type confirm/cancel” instruction to confirmation prompts.
src/main/java/world/bentobox/challenges/panel/CommonPanel.java Applies default lore colors, adds biome lore rendering, and prevents locked-level unlock-message leakage.
src/main/java/world/bentobox/challenges/panel/admin/ListUsersPanel.java Ensures admin completion triggers a level completion re-check.
src/main/java/world/bentobox/challenges/panel/admin/EditSettingsPanel.java Adds admin GUI toggle for open-anywhere.
src/main/java/world/bentobox/challenges/panel/admin/EditLevelPanel.java Adds island-level reward editing for levels.
src/main/java/world/bentobox/challenges/panel/admin/EditChallengePanel.java Adds biome requirement editing and reward chance/island level reward editing.
src/main/java/world/bentobox/challenges/managers/ChallengesManager.java Adds tryCompleteLevel/tryCompleteLevelAdmin helpers with shared validation logic.
src/main/java/world/bentobox/challenges/database/object/requirements/IslandRequirements.java Adds requiredBiomes storage with copy/serialization support.
src/main/java/world/bentobox/challenges/database/object/ChallengeLevel.java Adds rewardIslandLevel to level data model.
src/main/java/world/bentobox/challenges/database/object/Challenge.java Adds rewardChance, island-level rewards, and repeat island-level rewards to challenge model.
src/main/java/world/bentobox/challenges/config/Settings.java Adds openAnywhere, description/reward default colors, and improves config docs.
src/main/java/world/bentobox/challenges/commands/ChallengesPlayerCommand.java Allows GUI opening off-island when open-anywhere is enabled.
src/main/java/world/bentobox/challenges/commands/admin/CompleteCommand.java Ensures admin completions can trigger admin level completion.
src/main/java/world/bentobox/challenges/ChallengesAddon.java Registers new completion-percent placeholders (overall + latest level).
pom.xml Bumps build version to 1.8.0 and adds Sonar CPD exclusions for bean-like data objects.
CLAUDE.md Updates dev-doc dependency/runtime version notes.
.github/workflows/publish.yml Updates pinned reusable publish workflow SHA.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/world/bentobox/challenges/tasks/TryToComplete.java
Comment thread src/main/java/world/bentobox/challenges/panel/admin/EditChallengePanel.java Outdated
Comment thread src/main/java/world/bentobox/challenges/panel/user/ChallengesPanel.java Outdated
Comment thread src/test/java/world/bentobox/challenges/ChallengesAddonTest.java Outdated
Comment thread src/test/java/world/bentobox/challenges/ChallengesAddonTest.java Outdated
tastybento and others added 9 commits July 11, 2026 11:28
Boots a real Paper 1.21.11 server with BentoBox 3.14.0 + BSkyBlock 1.20.0
+ the Maven-built Challenges jar, and drives a headless Mineflayer bot to
verify in-game behaviour the MockBukkit unit tests can't.

A separate Gradle sidecar under e2e/ (does not touch the Maven build).
Uses useExternalPluginsOnly + writeFiles to deploy prebuilt jars; BentoBox
addons are staged into plugins/BentoBox/addons/ so they register as
gamemodes (the non-obvious part — dropping them in plugins/ leaves the
gamemode world uncreated and every gamemode command "Unknown").

Tests (src/test/e2e/challenges.spec.ts):
- smoke: bot joins 1.21.11, ops, runs a command, receives the reply.
- #329: opens the Challenges admin GUI, clicks Challenge Wipe, and asserts
  the confirmation instruction line added in #415 ("Type 'confirm' ... or
  'cancel' ...") — an end-to-end validation of a 1.8.0 feature in-game.

CI: .github/workflows/e2e.yml runs it on demand (workflow_dispatch) —
advisory/opt-in, not wired to every PR yet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
- workflow_dispatch input to filter by test name (-PtestNames)
- 25-min job timeout
- cache Paper jar + libraries + BentoBox/BSkyBlock deps + npm modules
- always upload server log + plugwright report as an artifact (so a
  regression failure is debuggable)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
- S7630 (BLOCKER, script injection): bind inputs.test_names to a
  TEST_NAMES env var and reference it as a quoted shell variable instead
  of interpolating ${{ inputs.* }} directly into the run block.
- S7637 (MAJOR, unpinned action): pin gradle/actions/setup-gradle to the
  v4.4.4 commit SHA.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Spike: plugwright in-game E2E tests (validates #329 on 1.8.0)
The on-demand E2E run failed in CI with "Server version '1.21.11' is not
supported. Latest supported version is '1.21.4'." — without a committed
package-lock.json, CI's fresh npm install resolved an older
mineflayer/minecraft-data than the local run, and it didn't know 1.21.11.

Commit the lockfile (mineflayer 4.37.1 / minecraft-data 3.111.0, which
support 1.21.11) so installs are reproducible, and key the npm cache on
the lockfile (also invalidates the stale node_modules the failed run
cached under the package.json hash).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Fix E2E CI: pin mineflayer via committed lockfile (1.21.11 support)
Extends the plugwright in-game suite with two tests that drive the admin
Settings GUI on a live Paper 1.21.11 server:

- open-anywhere (#349): the new "Open GUI Anywhere" Elytra toggle renders
  and its click-handler flips + persists the setting.
- include-undeployed (#179): the "Include Undeployed Challenges" barrel
  toggle now shipped in config.yml behaves the same way.

Both are self-restoring (read state, flip, assert, flip back) so they are
independent of the persisted run-dir config and of test ordering. Shared
openSettingsPanel()/expectToggleFlips() helpers; LiveGuiHandle/
GuiItemLocator types derived from PlayerWrapper since the package does not
re-export them. README coverage list updated. Full suite: 4/4 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfEq1X2sy57G8nq2Cd23ba
Add E2E toggle tests for 1.8.0 settings (#349, #179)
- ChallengesAddon.allLoaded(): reset levelProvided=false when the Level
  add-on is absent, so isLevelProvided() can't be stale-true and
  TryToComplete.rewardIslandLevel() can't NPE on a null level add-on.
- EditChallengePanel: sort the required-biome list before rendering so the
  admin GUI description is stable (the backing set is unordered).
- ChallengesPanel.createToggleUndeployedButton(): guard the template
  description with !isBlank() to avoid inserting empty lore lines, matching
  the other button builders.
- ChallengesAddonTest: verify placeholder registration with atLeastOnce()
  instead of times(13) so the tests don't break whenever a placeholder is
  added or removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfEq1X2sy57G8nq2Cd23ba
@tastybento

Copy link
Copy Markdown
Member Author

Thanks for the review — all five points are addressed in #425 (into develop, so it flows into this release):

  • rewardIslandLevel() NPE — good catch. allLoaded() now sets levelProvided = false in the "Level add-on not found" branch, so isLevelProvided() can't stay stale-true and the reward path can't dereference a null Level add-on.
  • Non-deterministic biome ordering — the required-biome list is now sorted before it's rendered, so the admin GUI stays stable between runs.
  • Blank template description on the toggle-undeployed button — added the !isBlank() guard so it matches the other button builders and doesn't insert an empty lore line.
  • times(13) placeholder assertions — switched both to atLeastOnce(). The exact count was incidental to what those tests check and made them brittle whenever a placeholder is added or removed.

I'll merge #425 before this one goes out.

@tastybento

Copy link
Copy Markdown
Member Author

1.8.0 in-game test plan (pre-release)

Run against a live server: BentoBox 3.14.0 + a game mode (BSkyBlock) + Level + Vault (+ PlaceholderAPI for the placeholder checks). The plugwright E2E already covers the #329 confirmation instruction and the admin-GUI toggle wiring for #349/#179 — the list below is the runtime behaviour that still needs a human on an island.

Setup

  • Fresh server boots with no errors; create an island and import the default challenges (admin GUI → Import Template), confirm /challenges opens.

Per-challenge reward chance (#76)

  • Challenge with reward-chance ~50%: complete it many times and confirm the reward is granted roughly half the time.
  • reward-chance 100% (or unset) always grants; reward-chance 0 never grants.

Island level rewards (#279) — needs Level addon

  • Challenge/level configured to grant island levels: complete it and confirm the island level (/is level) rises by the configured amount.
  • Disable/remove the Level addon and complete the same challenge — no error/NPE, the level reward is simply skipped (guards the Address Copilot review on the 1.8.0 release PR (#421) #425 fix).

Biome requirement (#335)

  • Challenge requiring specific biome(s): standing in a non-matching biome, completion is refused with the biome message.
  • Standing in a matching biome, completion succeeds.
  • Admin biome picker: add/remove biomes, reopen the button — the list renders in a stable, sorted order (Address Copilot review on the 1.8.0 release PR (#421) #425).

TOGGLEABLE undeployed-view-mode (#175)

  • Set undeployed-view-mode: TOGGLEABLE: the player GUI shows the show/hide toggle button.
  • Toggling hides/shows undeployed challenges for that player only; paging still behaves after the count changes.

Default text colour (#340)

  • Set gui-settings.description-color / reward-text-color: challenge description and reward lore pick up the colour.
  • A colour written into the challenge text itself still overrides the default.

Placeholders (#352) — needs PlaceholderAPI

  • %challenges_completed_percent% and %challenges_latest_level_completed_percent% expand to sensible values, and update as challenges are completed.

Open GUI off-island (#349)

  • open-anywhere: false (default): standing off your island, /challenges is refused with the not-on-island message.
  • open-anywhere: true: /challenges opens off-island — but actually completing a challenge off-island is still blocked by world protection.

include-undeployed (#179)

  • Toggle include-undeployed and confirm undeployed challenges are / are not counted toward level completion accordingly.

Locked-level "Congratulations" leak (#323)

  • A locked level's lore no longer shows the unlock/congratulations message.

removeWhenCompleted in the player GUI (#337)

  • Challenge flagged removeWhenCompleted disappears from the player GUI once completed.

Admin-completed level check (#385)

  • Admin completes the last challenge in a level for a player (/challenges admin complete ...): the level itself is marked complete and its level reward fires.

Ignore meta-data potion (#320)

  • Inventory challenge requiring a potion with "ignore meta-data": a potion of the same base type but different metadata satisfies it.

Confirmation prompts (#329) — quick sanity (covered by E2E)

  • An admin confirmation (e.g. Challenge Wipe) tells you to type confirm / cancel, and both paths work.

Address Copilot review on the 1.8.0 release PR (#421)
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants