Skip to content
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

Implement custom chat representations for configs #16

Merged
merged 7 commits into from
Jan 15, 2025

Conversation

xpple
Copy link
Owner

@xpple xpple commented Jan 12, 2025

Closes #14. This PR adds a new annotation property for custom chat representations of config values. In the chat, using Components yield the most customisability, more than just Strings. Hence the representation function has this as return type.

@xpple xpple requested a review from Earthcomputer January 12, 2025 20:14
@xpple xpple added enhancement New feature or request feature Adds a feature labels Jan 12, 2025
@fooeyround
Copy link

This is probably better than my pr, definitely better with the location of the map filling, I should have put that in its own method, calling it at the Collection/Map/Object branching.
Thank you for this, but can't you embed styles with § in vanilla and & in paper, vanilla users could use the built-in toString translator. Paper users could do their own thing. Either way it seems to be fine, working fine for @config, I forgot about adding a way for api users to access, but I guess with it being String represented it would be easier.

Either way thank you for doing this in less than 2 days!

@xpple
Copy link
Owner Author

xpple commented Jan 13, 2025

can't you embed styles with § in vanilla and & in paper, vanilla users could use the built-in toString translator.

I think you can, but iirc it's a legacy system which I don't really want to rely on.

@xpple xpple merged commit 5a318b5 into master Jan 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] The ability to specifiy the formating behavior of a config
2 participants