Question color codes "§" doesn't work

FeuSalamander

New member
Sep 29, 2022
4
0
1
I am creating a plugin for velocity, when a player send a message in the chat of a server , the plugin will send the message in all of the servers of the networth with the name of the player and his luckperms rank but the colors of the prefix doesn't color the string but in the string we can see the color code.

my code:

@Subscribe
public void onMessage(PlayerChatEvent e){
String m = e.getMessage();
String p = e.getPlayer().getUsername();
LuckPerms api = LuckPermsProvider.get();
User user = api.getPlayerAdapter(Player.class).getUser(e.getPlayer());
proxy.getAllServers().forEach(registeredServer -> registeredServer.sendMessage(Component.text(user.getCachedData().getMetaData().getPrefix() +p+": "+m)));
}

and the message in the chat is:
Sans titre.png
please help me