Interface Context
-
@NonExtendable public interface Context
Parser context for use within transformations.This allows operating recursive parses, for cases where messages may include parse-specific tags.
- Since:
- 4.10.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Component
deserialize(@NotNull java.lang.String message)
Deserializes a MiniMessage string using all the settings of this context.@NotNull Component
deserialize(@NotNull java.lang.String message, @NotNull TagResolver resolver)
Deserializes a MiniMessage string using all the settings of this context.@NotNull Component
deserialize(@NotNull java.lang.String message, @NotNull TagResolver @NotNull ... resolvers)
Deserializes a MiniMessage string using all the settings of this context.@NotNull ParsingException
newException(@NotNull java.lang.String message)
Create a new parsing exception without reference to a specific location.@NotNull ParsingException
newException(@NotNull java.lang.String message, @NotNull ArgumentQueue tags)
Create a new parsing exception.@NotNull ParsingException
newException(@NotNull java.lang.String message, @Nullable java.lang.Throwable cause, @NotNull ArgumentQueue args)
Create a new parsing exception.
-
-
-
Method Detail
-
deserialize
@NotNull @NotNull Component deserialize(@NotNull @NotNull java.lang.String message)
Deserializes a MiniMessage string using all the settings of this context.- Parameters:
message
- the message to parse- Returns:
- the parsed message
- Since:
- 4.10.0
-
deserialize
@NotNull @NotNull Component deserialize(@NotNull @NotNull java.lang.String message, @NotNull @NotNull TagResolver resolver)
Deserializes a MiniMessage string using all the settings of this context.- Parameters:
message
- the message to parseresolver
- additional tag resolver, added to all other resolvers in this parse, but taking priority in the event of a name overlap- Returns:
- the parsed message
- Since:
- 4.10.0
-
deserialize
@NotNull @NotNull Component deserialize(@NotNull @NotNull java.lang.String message, @NotNull @NotNull TagResolver @NotNull ... resolvers)
Deserializes a MiniMessage string using all the settings of this context.- Parameters:
message
- the message to parseresolvers
- additional tag resolvers, added to all other resolvers in this parse, but taking priority in the event of a name overlap- Returns:
- the parsed message
- Since:
- 4.10.0
-
newException
@NotNull @NotNull ParsingException newException(@NotNull @NotNull java.lang.String message, @NotNull @NotNull ArgumentQueue tags)
Create a new parsing exception.- Parameters:
message
- a detail message describing the errortags
- the tag parts which caused the error- Returns:
- the new parsing exception
- Since:
- 4.10.0
-
newException
@NotNull @NotNull ParsingException newException(@NotNull @NotNull java.lang.String message)
Create a new parsing exception without reference to a specific location.- Parameters:
message
- a detail message describing the error- Returns:
- the new parsing exception
- Since:
- 4.10.0
-
newException
@NotNull @NotNull ParsingException newException(@NotNull @NotNull java.lang.String message, @Nullable @Nullable java.lang.Throwable cause, @NotNull @NotNull ArgumentQueue args)
Create a new parsing exception.- Parameters:
message
- a detail message describing the errorcause
- the causeargs
- arguments that caused the errors- Returns:
- the new parsing exception
- Since:
- 4.10.0
-
-