Skip to content

Fix Adventure 5 compatibility: ClickEvent.Action is no longer an enum#4858

Open
renovate[bot] wants to merge 4 commits into
mainfrom
renovate/major-adventure
Open

Fix Adventure 5 compatibility: ClickEvent.Action is no longer an enum#4858
renovate[bot] wants to merge 4 commits into
mainfrom
renovate/major-adventure

Conversation

@renovate

@renovate renovate Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Adventure 5 changed ClickEvent.Action from an enum to a sealed class hierarchy with static constants and an Index<String, Action<?>> registry. This broke compilation in three places that relied on enum-specific APIs (values(), valueOf(), EnumSet).

Changes

  • Settings.javaClickEvent.Action.values() + Enum::nameClickEvent.Action.NAMES.keys() (returns Set<String>)
  • ClickStripTransform.javaEnumSet.copyOfSet.copyOf; field/constructor typed as Set<ClickEvent.Action<?>> / Set<? extends ClickEvent.Action<?>>
  • ComponentTransform.javastripClicks vararg typed as ClickEvent.Action<?>... with @SafeVarargs
  • CaptionUtility.javaClickEvent.Action::valueOfClickEvent.Action.NAMES::value; array-based stripClicks(stream.toArray(...)) replaced with new ClickStripTransform(stream.collect(Collectors.toUnmodifiableSet())) to avoid raw generic arrays
  • ClickStripTransformTest.javaEnumSet.of(action)Set.of(action); EnumSet.allOf(ClickEvent.Action.class)new HashSet<>(ClickEvent.Action.NAMES.values())

@renovate renovate Bot added the dependencies Dependency updates label Apr 20, 2026
@renovate renovate Bot requested a review from a team as a code owner April 20, 2026 00:58
@renovate renovate Bot enabled auto-merge (squash) April 20, 2026 00:58
@renovate renovate Bot force-pushed the renovate/major-adventure branch from ae1967c to 1c2c67d Compare April 26, 2026 17:22
@renovate renovate Bot force-pushed the renovate/major-adventure branch from 1c2c67d to 3f7a286 Compare May 12, 2026 03:53
@renovate renovate Bot force-pushed the renovate/major-adventure branch from 3f7a286 to b71c1d1 Compare May 13, 2026 23:14
@renovate renovate Bot changed the title Update adventure to v5 (major) Update adventure to v5 May 13, 2026
ClickEvent.Action is no longer an enum in Adventure 5 - it's a sealed class
hierarchy with static constants. Fix 3 compilation errors:

- Settings.java: replace enum values()/name() with NAMES.keys()
- CaptionUtility.java: replace enum valueOf() with NAMES.value() lookup
- ClickStripTransform.java: replace EnumSet.copyOf with Set.copyOf
auto-merge was automatically disabled June 14, 2026 19:44

Head branch was pushed to by a user without write access

Copilot AI requested a review from NotMyFault June 14, 2026 19:46
Copilot AI added 2 commits June 14, 2026 19:53
…p code

- ClickStripTransform: use Set<ClickEvent.Action<?>> field and
  Set<? extends ClickEvent.Action<?>> constructor parameter
- ComponentTransform: update stripClicks vararg to ClickEvent.Action<?>...
  with @SafeVarargs
- CaptionUtility: replace toArray+stripClicks with Collectors.toUnmodifiableSet()
  piped directly into ClickStripTransform constructor
- ClickStripTransformTest: replace EnumSet.of/allOf with Set.of/NAMES.values()
Copilot AI changed the title Update adventure to v5 Fix Adventure 5 compatibility: ClickEvent.Action is no longer an enum Jun 14, 2026
@renovate

renovate Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant