Text style: RESET и (concat -> merge)
This commit is contained in:
@@ -18,6 +18,7 @@ public class TextStyle {
|
||||
public static final TextStyle UNDERLINE = new TextStyle(null, null, true, null, null);
|
||||
public static final TextStyle STRIKETHOUGH = new TextStyle(null, null, null, true, null);
|
||||
public static final TextStyle OBFUSCATED = new TextStyle(null, null, null, null, true);
|
||||
public static final TextStyle RESET = new TextStyle(false, false, false, false, false);
|
||||
|
||||
private static class OptionalBoolean {
|
||||
private static final Optional<Boolean> TRUE = Optional.of(true);
|
||||
@@ -54,7 +55,7 @@ public class TextStyle {
|
||||
this.obfuscated = OptionalBoolean.of(obfuscated);
|
||||
}
|
||||
|
||||
public void concat(TextStyle style) {
|
||||
public void merge(TextStyle style) {
|
||||
if (style.bold.isPresent()) this.bold = style.bold;
|
||||
if (style.italic.isPresent()) this.italic = style.italic;
|
||||
if (style.underline.isPresent()) this.underline = style.underline;
|
||||
|
||||
Reference in New Issue
Block a user