Skip to content

Add component resolution syntax#8698

Open
APickledWalrus wants to merge 1 commit into
dev/featurefrom
feature/component-resolution
Open

Add component resolution syntax#8698
APickledWalrus wants to merge 1 commit into
dev/featurefrom
feature/component-resolution

Conversation

@APickledWalrus

Copy link
Copy Markdown
Member

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 player or "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

@APickledWalrus APickledWalrus requested a review from a team as a code owner June 10, 2026 15:08
@APickledWalrus APickledWalrus added the don't merge me !! For pull requests that should not be merged due to some outstanding dispute, conflict or dependency. label Jun 10, 2026
@APickledWalrus APickledWalrus requested review from TheMug06 and UnderscoreTud and removed request for a team June 10, 2026 15:08
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
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@skriptlang-automation skriptlang-automation Bot added the needs reviews A PR that needs additional reviews label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

don't merge me !! For pull requests that should not be merged due to some outstanding dispute, conflict or dependency. needs reviews A PR that needs additional reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants