mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-02 11:21:15 +01:00
Allow special color code to be false
This commit is contained in:
parent
2b021e26c1
commit
5460d8e6c4
@ -251,29 +251,19 @@ public class ColoredText {
|
||||
object.addProperty("color", color);
|
||||
}
|
||||
|
||||
if (specialComponentContainer.bold) {
|
||||
object.addProperty("bold", "true");
|
||||
}
|
||||
|
||||
if (specialComponentContainer.italic) {
|
||||
object.addProperty("italic", "true");
|
||||
}
|
||||
|
||||
if (specialComponentContainer.underlined) {
|
||||
object.addProperty("underlined", "true");
|
||||
}
|
||||
|
||||
if (specialComponentContainer.strikethrough) {
|
||||
object.addProperty("strikethrough", "true");
|
||||
}
|
||||
|
||||
if (specialComponentContainer.obfuscated) {
|
||||
object.addProperty("obfuscated", "true");
|
||||
}
|
||||
object.addProperty("bold", getBoolean(specialComponentContainer.bold));
|
||||
object.addProperty("italic", getBoolean(specialComponentContainer.italic));
|
||||
object.addProperty("underlined", getBoolean(specialComponentContainer.underlined));
|
||||
object.addProperty("strikethrough", getBoolean(specialComponentContainer.strikethrough));
|
||||
object.addProperty("obfuscated", getBoolean(specialComponentContainer.obfuscated));
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
private String getBoolean(boolean value) {
|
||||
return value ? "true" : "false";
|
||||
}
|
||||
|
||||
private enum MessageType {
|
||||
RAW, KEYBIND, TRANSLATABLE
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user