Reputation: 47
So I have been learning how to code MC plugins on intellij and have came across this thing in a tutorial in which when I run a command, I can output a message that is yellow and bolded...
if (cmd.getName().equalsIgnoreCase("feed")){
player.setFoodLevel(20);
player.sendMessage("§e§l[Command] §eHunger bar restored successfully!");
}
So we have special characters there modifying the colour of the output text. What is the name of the colour changer? (Like we have rgb, hex code, etc. So what is this kind called?)
Upvotes: 2
Views: 103
Reputation: 26
§
is called a section symbol. It is used in Minecraft to indicate the start of a color code, and an unofficial alternative of it is the &
symbol.
When using §
followed by a hex digit, it tells the client to alter the format of that piece of text. The hex digits specified after the section symbol are based off the CGA 16-color palette.
Upvotes: 1