Package dev.majek.chattools
Interface MiniMessageWrapper
-
- All Superinterfaces:
net.kyori.adventure.util.Buildable<MiniMessageWrapper,MiniMessageWrapper.Builder>
public interface MiniMessageWrapper extends net.kyori.adventure.util.Buildable<MiniMessageWrapper,MiniMessageWrapper.Builder>
A wrapper forMiniMessageto add a few more methods for more customization.- Author:
- Majekdor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMiniMessageWrapper.BuilderA builder forMiniMessageWrapper.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static @NotNull MiniMessageWrapper.Builderbuilder()Creates a newMiniMessageWrapper.Builder.static @NotNull MiniMessageWrapperlegacy()Gets a simple instance with legacy code support.@NotNull net.kyori.adventure.text.ComponentmmParse(@NotNull String mmString)Parse a string into aComponentusingMiniMessage.@NotNull StringmmString(@NotNull String mmString)Get the modified string.static @NotNull MiniMessageWrapperstandard()Gets a simple instance.@NotNull MiniMessageWrapper.BuildertoBuilder()Create aMiniMessageWrapper.Builderto modify options.
-
-
-
Method Detail
-
standard
@NotNull static @NotNull MiniMessageWrapper standard()
Gets a simple instance.
This will parse everything like
MiniMessagewill except for advanced transformations.Builder options with this instance:
- Gradients: True
- Hex Colors: True
- Standard Colors: True
- Legacy Colors: False
- Advanced Transformations: False
- Placeholder Resolver: Empty
- Block Text Decorations: None
- Blocked Colors: None
- Luminance Threshold: 0
- Returns:
- a simple instance
-
legacy
@NotNull static @NotNull MiniMessageWrapper legacy()
Gets a simple instance with legacy code support.
This will parse everything like
MiniMessagewill with the addition of legacy code support and the subtraction of advanced transformation support.Builder options with this instance:
- Gradients: True
- Hex Colors: True
- Standard Colors: True
- Legacy Colors: True
- Advanced Transformations: False
- Placeholder Resolver: Empty
- Block Text Decorations: None
- Blocked Colors: None
- Luminance Threshold: 0
- Returns:
- a simple instance
-
mmParse
@NotNull @NotNull net.kyori.adventure.text.Component mmParse(@NotNull @NotNull String mmString)Parse a string into aComponentusingMiniMessage.- Parameters:
mmString- the string to parse- Returns:
- component
-
mmString
@NotNull @NotNull String mmString(@NotNull @NotNull String mmString)
Get the modified string.- Parameters:
mmString- string to modify- Returns:
- modified string
-
builder
@NotNull static @NotNull MiniMessageWrapper.Builder builder()
Creates a new
MiniMessageWrapper.Builder.Default builder options:
- Gradients: True
- Hex Colors: True
- Standard Colors: True
- Legacy Colors: False
- Advanced Transformations: False
- Returns:
- a builder
-
toBuilder
@NotNull @NotNull MiniMessageWrapper.Builder toBuilder()
Create aMiniMessageWrapper.Builderto modify options.- Specified by:
toBuilderin interfacenet.kyori.adventure.util.Buildable<MiniMessageWrapper,MiniMessageWrapper.Builder>- Returns:
- a builder
-
-