-
-
Notifications
You must be signed in to change notification settings - Fork 414
Adventure Text Component (Chat) Integration #8322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
APickledWalrus
wants to merge
46
commits into
dev/feature
Choose a base branch
from
feature/adventure-chat-integration
base: dev/feature
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Significantly improves compatibility with string-based syntax. Note that usage of the 'colored' expression is required to process formatting.
Cursed, but it works
We actually only need to disable styling, not perform a full reset.
sovdeeth
requested changes
Dec 21, 2025
Member
sovdeeth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good at 75/108
src/main/java/org/skriptlang/skript/bukkit/misc/expressions/ExprMOTD.java
Outdated
Show resolved
Hide resolved
Likely better for compatibility
Co-authored-by: sovdee <[email protected]>
This was
linked to
issues
Dec 22, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking changes
Pull or feature requests that contain breaking changes (API, syntax, etc.)
bug
An issue that needs to be fixed. Alternatively, a PR fixing an issue.
enhancement
Feature request, an issue about something that could be improved, or a PR improving something.
feature
Pull request adding a new feature.
needs reviews
A PR that needs additional reviews
needs testing
Needs testing to determine current status or issue validity, or for WIP feature pulls.
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
Skript's existing text formatting system is outdated, buggy at times, and heavily integrated with the deprecated Bungeecord Component System. As a result, Skript is missing many of the modern text rendering features available through Adventure. Further, many syntax elements use deprecated methods (or just cannot be implemented) due to missing Component support.
Solution
This PR deprecates and replaces all internal usages of the existing text formatting API in favor of Adventure and MiniMessage. I am finalizing the work and testing, but this is generally ready for reviews. I have included a brief walkthrough of the primary changes below.
The Parser
The main parser is represented within TextComponentParser. This parser contains two MiniMessage instances: one for "safe" parsing (e.g. only color/styling codes) and one for "unsafe" parsing (e.g. hovers, click events). As an example,
colored "text"uses the former whileformatted "text"uses the latter.The parser also includes API methods for registering custom tags. This enables addons to register their own formatting codes with Skript's text parser.
Compatibility Efforts
The existing configuration options,
link parse modeandcolors cause resethave been fully preserved. The former is nicely implemented using the TextReplacement feature of Components, while the latter is somewhat hacked together due to how resets are implemented in MiniMessage.Legacy formatting codes/tags have also been preserved. There is a compatibility process built in for mapping them to known tags. There is also a compatibility process for supporting color tags with spaces, e.g.
<dark red>. One important note is that I have overridden the<u>tag, which is normally used for underlines in MiniMessage, to instead continue behaving as a tag for inserting unicode characters.There are converters registered for moving between Strings and Components, though Components are preferred whenever possible.
I have updated
AnyNamedto include support for Component based operations. The methods are default so that this is non-breaking.Conversion Efforts
Most, if not all, existing syntax places where Components can be used have been updated to use Components. I took this opportunity to implement several new modules:
BlockModulesignEntityModulemiscand submodulePlayerModuleItemModulemiscandbookMiscModulebukkit.miscsubpackage. Existing syntax there has not been converted.TextModuleTextComponentParserand text-related syntax, such as message effects and formatting expressions.For better compatibility (and readability), I have split up
ExprMessageinto multiple expressions (one per message type/event).This PR does not implement Component support for chat formatting. That is more complex and will require a dedicated pull request.
Breaking Changes
Many syntax classes have been relocated. If they were being directly referenced, then there will be breaking. I think we should generally consider syntax classes to be internal though.
Other
I have removed the BungeeCord Serializer dependency as it is no longer used.
Testing Completed
No extensive additional tests have been added yet. I performed basic in-game testing. I plan to implement more extensive testing.
Supporting Information
Completes:
<ttp:'<test'>unformatted x, which returns the plain text contentsendRichMessagemethod from Audiences in script #5792Related: none
AI assistance: none