#Text doesn't get added to my TextComponent

1 messages · Page 1 of 1 (latest)

jolly cove
#

I have the following method to parse hex colors, it works fine, but when I try to parse a string without any colors, then it returns an empty string. More interesting is that the problem is that .addExtra() method doesn't append my string to the TextComponent.
Code: https://paste.md-5.net/texosujeba.cpp

#

Output:
subStringLast: test string
subStringLastWithColor: test string

#

the third output is just an empty string

#

Main.getInstance().getLogger().info(HexUtils.hexFormatTextComponent("test string").getText());

pliant pond
#

what library ru using

#

for components

#

adventure?

jolly cove
jolly cove
pliant pond
#

@jolly cove first of all

#

u ought not to use translateAlternateColorCodes with components

#

use one or the other, dont mix both

jolly cove
#

ok, but if I put it without this method, it still returns an empty string