Fix Adventure 5 compatibility: ClickEvent.Action is no longer an enum#4858
Open
renovate[bot] wants to merge 4 commits into
Open
Fix Adventure 5 compatibility: ClickEvent.Action is no longer an enum#4858renovate[bot] wants to merge 4 commits into
renovate[bot] wants to merge 4 commits into
Conversation
ae1967c to
1c2c67d
Compare
1c2c67d to
3f7a286
Compare
3f7a286 to
b71c1d1
Compare
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
…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
Contributor
Author
Edited/Blocked NotificationRenovate 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adventure 5 changed
ClickEvent.Actionfrom anenumto a sealed class hierarchy with static constants and anIndex<String, Action<?>>registry. This broke compilation in three places that relied on enum-specific APIs (values(),valueOf(),EnumSet).Changes
Settings.java—ClickEvent.Action.values()+Enum::name→ClickEvent.Action.NAMES.keys()(returnsSet<String>)ClickStripTransform.java—EnumSet.copyOf→Set.copyOf; field/constructor typed asSet<ClickEvent.Action<?>>/Set<? extends ClickEvent.Action<?>>ComponentTransform.java—stripClicksvararg typed asClickEvent.Action<?>...with@SafeVarargsCaptionUtility.java—ClickEvent.Action::valueOf→ClickEvent.Action.NAMES::value; array-basedstripClicks(stream.toArray(...))replaced withnew ClickStripTransform(stream.collect(Collectors.toUnmodifiableSet()))to avoid raw generic arraysClickStripTransformTest.java—EnumSet.of(action)→Set.of(action);EnumSet.allOf(ClickEvent.Action.class)→new HashSet<>(ClickEvent.Action.NAMES.values())