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

Expand component support and the ChatCode API #3112

Open
2 of 6 tasks
FranKusmiruk opened this issue Jul 7, 2020 · 5 comments
Open
2 of 6 tasks

Expand component support and the ChatCode API #3112

FranKusmiruk opened this issue Jul 7, 2020 · 5 comments
Labels
core task Tasks that may be handled only by the core developer team. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@FranKusmiruk
Copy link
Member

FranKusmiruk commented Jul 7, 2020

Description

Since Spigot/Paper is starting to use components in more and more places, we need to add support to use it. Right now, we only support components in chat messages, but this is also supported in the following:

And over all, we should standardize a way to pass around components in a way addon developers are able to use them as well, it's only possible to access them internally as of now. The best way to do this would be expanding the ChatCode API to allow chat codes be parsed in any string, this way we can also introduce things such as <nl> for new lines in Skript.

@FranKusmiruk FranKusmiruk added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. core task Tasks that may be handled only by the core developer team. labels Jul 7, 2020
@FranKusmiruk FranKusmiruk added this to the 2.6 milestone Jul 7, 2020
@APickledWalrus
Copy link
Member

APickledWalrus commented Jul 7, 2020

With my work in #3098, I’d be happy to continue working in this part of the plugin and tackle parts of this.
EDIT: Just noticed the "core task" tag haha.

@Moderocky
Copy link
Member

I think this would be a good opportunity to also add support for some of the other component types, such as translations and keybinds. It might be worth just adding them all :)

Note that there are now options for other things in the "hover event" (tooltip) such as items and entities, so this could be added as well. Minecraft has support for a few other things here (such as NBT), but I'm not sure how many of them made it into the chat component API yet, and they might be better suited to addons anyway.

If other component types were to be implemented (translations, etc.) how would you see the pattern working?

@FranKusmiruk
Copy link
Member Author

With my work in #3098, I’d be happy to continue working in this part of the plugin and tackle parts of this.
EDIT: Just noticed the "core task" tag haha.

I should've been more clear with the core task is more of a warning that implies the feature or whatever is being worked on needs of a considerable amount of planning and clear design choices before going to the implementation, and that requires some understanding of Skript to be done hence why it is labeled as such. We still appreciate any kind of input, and almost all discussion is done at #skript-dev in Skript-chat so you're more than welcome to tell us your idea on the matter.

I think this would be a good opportunity to also add support for some of the other component types, such as translations and keybinds. It might be worth just adding them all :)

I was planning on adding those features as well, will edit the main issue accordingly.

Note that there are now options for other things in the "hover event" (tooltip) such as items and entities, so this could be added as well. Minecraft has support for a few other things here (such as NBT), but I'm not sure how many of them made it into the chat component API yet, and they might be better suited to addons anyway.

If the implementation of those features is solid enough at the moment (it has always been available but the component API didn't have proper support for it), we should allow the usage of them as well. The only issue I see is the fact that items/entities are things that may be only able to be converted to a component at runtime, we'll have to figure out a way to create the hover event at runtime (right now all components are created at parse-time) and that'll require some modifications to the current API as well.

If other component types were to be implemented (translations, etc.) how would you see the pattern working?

The current pattern is working pretty well, but we or addon developer may introduce some other advanced features such as the ones provided by the library MiniMessage, which is something to think about when designing this.

@legofreak1999
Copy link

I can't seem to find the #skript-dev channel. But this propably won't help since its paper but here u can find a little list if something got missed in the progress. Paper issue

@FranKusmiruk
Copy link
Member Author

With Adventure being part of Paper now, we may as well just use MiniMessage instead of our chatcode API, it's still open for discussion though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core task Tasks that may be handled only by the core developer team. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

4 participants