command-flow
command-flow copied to clipboard
Replace text with adventure
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).
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.
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
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)
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.
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.