From 16f3355bbbd2170dd8f836885f5c887ff65c5f7d Mon Sep 17 00:00:00 2001
From: Debucquoy Anthony tonitch
Date: Tue, 25 Oct 2022 13:42:04 +0200
Subject: rework of the color code with & and standard codes (#5416)
* adding build* to gitignore and tags for ctags
* Notation Changes
* Adding & Parser
* Avoid crash when & as first character
* Looking for @ in the rest of the project
* Formating style
* Modifying test to reflect new behaviours
* Adding a check for the first part
* fixup! Adding & Parser
style changes
* Update APIDesk.lua
* Update src/CompositeChat.cpp
Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com>
* explaination on the antishlash with ampersand
* adding old deprecated formating
* Update src/CompositeChat.cpp
Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com>
* Update src/CompositeChat.cpp
* Update src/CompositeChat.cpp
Co-authored-by: Debucquoy
Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com>
---
Server/Plugins/APIDump/APIDesc.lua | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
(limited to 'Server/Plugins/APIDump/APIDesc.lua')
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua
index 03fb31990..f920a8f5b 100644
--- a/Server/Plugins/APIDump/APIDesc.lua
+++ b/Server/Plugins/APIDump/APIDesc.lua
@@ -2228,18 +2228,21 @@ end
Chaining example below for details.
Each part of the composite chat message takes a "Style" parameter, this is a string that describes
- the formatting. It uses the following strings, concatenated together:
+ the formatting. It uses the "standard" minecraft format code without the '&' symbole, concatenated
+ together:
String | Style |
- b | Bold text |
- i | Italic text |
- u | Underlined text |
- s | Strikethrough text |
- o | Obfuscated text |
- @X | color [0–9a–f], same as dye meta |
+ l | Bold text |
+ o | Italic text |
+ n | Underlined text |
+ m | Strikethrough text |
+ k | Obfuscated text |
+ r | Reset Style |
+ [0-9a-f] | colors |
+ You can escape the '&' character with an antislash in front of it. as follow: `I love Choco\&chips`
The following picture, taken from the Minecraft Wiki, illustrates the color codes:
-
+
]],
Functions =
{
--
cgit v1.2.3