"this is text"Simple, isn't it? If an effect, expression, condition, trigger or function accepts something of type text or string, you can use this format to write it right there!
Formatting TextBut isn't just text a bit boring? Worry not, as Minecraft has support for colors, styles and other formatting options in chat. Most of the options also work with item and entity names.
ColorsMinecraft has 16 pre-set color codes to be used in text. Skript supports them in two different ways:
- Color name tags, for example <red>
- (Old) Minecraft color codes, like §c; using & works, too
Here's a table of all colors, including both Skript names and color codes:
|§3||cyan||aqua, dark cyan, dark aqua, dark turquoise, dark turquois|
|§6||orange||orange, gold, dark yellow|
|§7||grey||light grey, gray, light gray, silver|
|§8||grey||light grey, gray, light gray, silver|
|§9||light blue||light blue, indigo|
|§a||light green||lime, lime green|
|§b||light cyan||light aqua, turquoise, turquois, light blue|
Other StylesMinecraft also has various other styles available. The following are available everywhere, including item and entity names:
Skript also supports certain newer features, which are only available in chat. Those do not have formatting codes, so you must use tags for them.
|link||open url, url||Opens a link when player clicks on text|
|run command||command, cmd||Makes player execute a chat command when they click on text|
|suggest command||Adds a command to chat prompt of player when clicked|
|tooltip||show text||Shows a tooltip when player hovers over text with their mouse|
Text and VariablesVariable names are text, but obviously formatting that text does no good. However, everything else you can do for text, you can do for variable names. A guide about this is coming... some day.
Guide written by bensku.