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

Replace text with adventure #17

Closed
MCMDEV opened this issue Sep 10, 2021 · 5 comments · Fixed by #28
Closed

Replace text with adventure #17

MCMDEV opened this issue Sep 10, 2021 · 5 comments · Fixed by #28

Comments

@MCMDEV
Copy link
Contributor

MCMDEV commented Sep 10, 2021

The library used by the project for message components has had a major api update and a project rename (text -> adventure).
As adventure has become the de facto standard in minecraft development, switching to the new version would increase compatibility and usability by a lot. (Paper and Velocity for example, both use adventure natively).

@FixedDev
Copy link
Owner

Adventure adds a significant weight increase in projects using CommandFlow, and that's something that we don't want.

CommandFlow already adds 180-200kb of weight only by itself, adding our own stripped version of text adds another 50-80kb, adventure adds a lot more than that.

@yusshu
Copy link
Contributor

yusshu commented Sep 10, 2021

I think we can remove 'text' dependency
See this class I made for obtaining command usage as string. So people can do something like that using Adventure

@OcZi
Copy link
Contributor

OcZi commented Sep 11, 2021

Command Flow is independent of minecraft, and then it is implemented on the platform of its module.

Adventure doesn't seem to depend directly on Minecraft; but any change within Universal CommandFlow can create incompatibilities between platforms and / or bring third-party libraries that will weigh the project even more in modules not related to minecraft (discord, with libraries like apache commons, guava, etc)

@FixedDev
Copy link
Owner

I think we can remove 'text' dependency
See this class I made for obtaining command usage as string. So people can do something like that using Adventure

Actually, that is possible, since the Visitor pattern for parts is already implemented in the last version.
The problem is that it wouldn't allow for colors, translations or other things to be used natively.

@OcZi
Copy link
Contributor

OcZi commented Sep 11, 2021

If exists the option to remove text-api and maybe commit an alternative like a Text object wrapper for any kind of component or just a message interceptor of commandflow for color translation, it would be possible, but i think it needs to be another issue for this idea.

@FixedDev FixedDev mentioned this issue Apr 13, 2023
@FixedDev FixedDev reopened this Apr 13, 2023
@FixedDev FixedDev linked a pull request Apr 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants