Class Style
java.lang.Object
net.minecraft.network.chat.Style
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable Booleanprivate final @Nullable ClickEventprivate final @Nullable TextColorstatic final Styleprivate final @Nullable FontDescriptionprivate final @Nullable HoverEventprivate final @Nullable Stringprivate final @Nullable Booleanstatic final intprivate final @Nullable Booleanprivate final @Nullable Integerprivate final @Nullable Booleanprivate final @Nullable Boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateStyle(@Nullable TextColor color, @Nullable Integer shadowColor, @Nullable Boolean bold, @Nullable Boolean italic, @Nullable Boolean underlined, @Nullable Boolean strikethrough, @Nullable Boolean obfuscated, @Nullable ClickEvent clickEvent, @Nullable HoverEvent hoverEvent, @Nullable String insertion, @Nullable FontDescription font) -
Method Summary
Modifier and TypeMethodDescriptionapplyFormat(ChatFormatting format) applyFormats(ChatFormatting... formats) applyLegacyFormat(ChatFormatting format) Merges the style with another one.private static <T> StylecheckEmptyAfterChange(Style newStyle, @Nullable T previous, @Nullable T next) private static Stylecreate(Optional<TextColor> color, Optional<Integer> shadowColor, Optional<Boolean> bold, Optional<Boolean> italic, Optional<Boolean> underlined, Optional<Boolean> strikethrough, Optional<Boolean> obfuscated, Optional<ClickEvent> clickEvent, Optional<HoverEvent> hoverEvent, Optional<String> insertion, Optional<FontDescription> font) boolean@Nullable ClickEvent@Nullable TextColorgetColor()getFont()@Nullable HoverEvent@Nullable String@Nullable IntegerinthashCode()booleanisBold()booleanisEmpty()booleanisItalic()booleanbooleanbooleantoString()withClickEvent(@Nullable ClickEvent clickEvent) withColor(int color) withColor(@Nullable ChatFormatting color) withFont(@Nullable FontDescription font) withHoverEvent(@Nullable HoverEvent hoverEvent) withInsertion(@Nullable String insertion) withItalic(@Nullable Boolean italic) withObfuscated(@Nullable Boolean obfuscated) withShadowColor(int shadowColor) withStrikethrough(@Nullable Boolean strikethrough) withUnderlined(@Nullable Boolean underlined)
-
Field Details
-
EMPTY
-
NO_SHADOW
public static final int NO_SHADOW- See Also:
-
color
-
shadowColor
-
bold
-
italic
-
underlined
-
strikethrough
-
obfuscated
-
clickEvent
-
hoverEvent
-
insertion
-
font
-
-
Constructor Details
-
Style
private Style(@Nullable TextColor color, @Nullable Integer shadowColor, @Nullable Boolean bold, @Nullable Boolean italic, @Nullable Boolean underlined, @Nullable Boolean strikethrough, @Nullable Boolean obfuscated, @Nullable ClickEvent clickEvent, @Nullable HoverEvent hoverEvent, @Nullable String insertion, @Nullable FontDescription font)
-
-
Method Details
-
create
private static Style create(Optional<TextColor> color, Optional<Integer> shadowColor, Optional<Boolean> bold, Optional<Boolean> italic, Optional<Boolean> underlined, Optional<Boolean> strikethrough, Optional<Boolean> obfuscated, Optional<ClickEvent> clickEvent, Optional<HoverEvent> hoverEvent, Optional<String> insertion, Optional<FontDescription> font) -
getColor
-
getShadowColor
-
isBold
public boolean isBold() -
isItalic
public boolean isItalic() -
isStrikethrough
public boolean isStrikethrough() -
isUnderlined
public boolean isUnderlined() -
isObfuscated
public boolean isObfuscated() -
isEmpty
public boolean isEmpty() -
getClickEvent
-
getHoverEvent
-
getInsertion
-
getFont
-
checkEmptyAfterChange
-
withColor
-
withColor
-
withColor
-
withShadowColor
-
withoutShadow
-
withBold
-
withItalic
-
withUnderlined
-
withStrikethrough
-
withObfuscated
-
withClickEvent
-
withHoverEvent
-
withInsertion
-
withFont
-
applyFormat
-
applyLegacyFormat
-
applyFormats
-
applyTo
-
toString
-
equals
-
hashCode
-