Add component resolution syntax#8698
Open
APickledWalrus wants to merge 1 commit into
Open
Conversation
Fusezion
reviewed
Jun 10, 2026
Comment on lines
+72
to
+75
| } catch (IOException | RuntimeException ignored) { | ||
| // IOException is thrown for lack of permission | ||
| // RuntimeException is thrown for something like an invalid selector | ||
| } |
Contributor
There was a problem hiding this comment.
Just a thought but would it be wrong to provide runtime errors for this?
Everything else seems fine and in my opinion offers a better handling than what "" formatted for player would of done.
However the fact two errors are being ignored but provide meaningful information I think its worth explaining to a player.
Lack of permission, I'm not 100% sure where this may be sent honestly so it may not be super useful
but the invalid selector is a useful thing to know why it ends up deleting the information otherwise it can be pretty difficult to debug
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.
Problem
As seen with #8689, it is not currently possible to use some components (such as Selector components) as they must first be resolved through the Paper API.
Solution
This is more of a proposal to get the discussion going. I added a distinct expression for resolving a component, but I think it is still slightly awkward. One alternative would be to instead integrate this into ExprColored (e.g.
formatted "hello" for playeror"hello" formatted for player, though I'm not sure that describes well enough what is happening. I'd like to hear what others think 🙂Testing Completed
In-game testing + a small test script
Supporting Information
n/a
Completes:
Related: none
AI assistance: none