command-flow icon indicating copy to clipboard operation
command-flow copied to clipboard

Replace text with adventure

Open MCMDEV opened this issue 3 years ago • 5 comments

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).

MCMDEV avatar Sep 10 '21 20:09 MCMDEV

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.

FixedDev avatar Sep 10 '21 20:09 FixedDev

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

yusshu avatar Sep 10 '21 20:09 yusshu

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)

OcZi avatar Sep 11 '21 00:09 OcZi

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.

FixedDev avatar Sep 11 '21 02:09 FixedDev

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.

OcZi avatar Sep 11 '21 07:09 OcZi