Class ChatMessages
java.lang.Object
ch.njol.skript.util.chat.ChatMessages
Deprecated, for removal: This API element is subject to removal in a future version.
Handles parsing chat messages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanDeprecated, for removal: This API element is subject to removal in a future version.If color codes should also function as reset code.static LinkParseModeDeprecated, for removal: This API element is subject to removal in a future version.Link parse mode for potential links which are not marked with tags. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyStyles(MessageComponent from, MessageComponent to) Deprecated, for removal: This API element is subject to removal in a future version.Copies styles from component to another.static List<MessageComponent> fromParsedString(String msg) Deprecated, for removal: This API element is subject to removal in a future version.Parses a string that may only contain colour codes using the '§' character to a list of components.static List<MessageComponent> Deprecated, for removal: This API element is subject to removal in a future version.Parses a string to list of chat message components.static MessageComponent[]parseToArray(String msg) Deprecated, for removal: This API element is subject to removal in a future version.static MessageComponentDeprecated, for removal: This API element is subject to removal in a future version.Constructs plain text only message component.static voidregisterAddonCode(@Nullable SkriptAddon addon, @Nullable ChatCode code) Deprecated, for removal: This API element is subject to removal in a future version.Registers a chat code.static voidDeprecated, for removal: This API element is subject to removal in a future version.Registers language change listener for chat system.static voidshareStyles(MessageComponent[] components) Deprecated, for removal: This API element is subject to removal in a future version.static StringstripStyles(String text) Deprecated, for removal: This API element is subject to removal in a future version.Strips all styles from given string.static StringDeprecated, for removal: This API element is subject to removal in a future version.static StringtoJson(List<MessageComponent> components) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
linkParseMode
Deprecated, for removal: This API element is subject to removal in a future version.Link parse mode for potential links which are not marked with tags. -
colorResetCodes
public static boolean colorResetCodesDeprecated, for removal: This API element is subject to removal in a future version.If color codes should also function as reset code.
-
-
Constructor Details
-
ChatMessages
public ChatMessages()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
registerListeners
public static void registerListeners()Deprecated, for removal: This API element is subject to removal in a future version.Registers language change listener for chat system. Called once by Skript, please don't call this addon developers. -
parse
Deprecated, for removal: This API element is subject to removal in a future version.Parses a string to list of chat message components.- Parameters:
msg- Input string.- Returns:
- List with components.
-
parseToArray
Deprecated, for removal: This API element is subject to removal in a future version. -
fromParsedString
Deprecated, for removal: This API element is subject to removal in a future version.Parses a string that may only contain colour codes using the '§' character to a list of components. -
toJson
-
toJson
Deprecated, for removal: This API element is subject to removal in a future version. -
copyStyles
Deprecated, for removal: This API element is subject to removal in a future version.Copies styles from component to another. Note that this only copies additional styling, i.e. if text was not bold and is bold, it will remain bold.- Parameters:
from-to-
-
plainText
Deprecated, for removal: This API element is subject to removal in a future version.Constructs plain text only message component.- Parameters:
str-
-
registerAddonCode
public static void registerAddonCode(@Nullable @Nullable SkriptAddon addon, @Nullable @Nullable ChatCode code) Deprecated, for removal: This API element is subject to removal in a future version.Registers a chat code. This is for addon developers.- Parameters:
code- Something that implementsChatCode. For inspiration, checkSkriptChatCodesource code.
-
stripStyles
-
TextComponentParser.