[UTIL] Minecraft formatting code factory

Hi! :smiley:
This is me first post, and I’ll show a little class that I created.

With this class you can transform a minecraft formatted string to a text object!

Link: http://pastebin.com/yEzadMwL

Screenshots:

Sorry to tell you, but this already exists in the API: https://jd.spongepowered.org/3.0.0/org/spongepowered/api/text/serializer/TextSerializers.html

Using the FORMATTING_CODE TextSerializer you can go to and from “&” notated strings.

There’s also a few other options there too, most notably JSON and Plain serializers.

4 Likes

M… I didn’t see that class :confused:

I’m new on sponge (I do spigot plugins), and it’s all new to me XD

3 Likes