Package com.nexomc.nexo.utils
Object AdventureUtils
-
- All Implemented Interfaces:
public class AdventureUtils
-
-
Field Summary
Fields Modifier and Type Field Description public final static MiniMessageSTANDARD_MINI_MESSAGEpublic final static LegacyComponentSerializerLEGACY_SERIALIZERprivate final MiniMessageMINI_MESSAGEpublic final static AdventureUtilsINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleancontainsLegacyCodes(String value)final Unitreload()final ComponentsetDefaultStyle(Component $self, TextColor color)final static MiniMessageMINI_MESSAGE_PLAYER(Player player)final static StringparseMiniMessage(String message, TagResolver tagResolver)final static StringparseLegacy(String message)Parses the string by deserializing it to a legacy component, then serializing it to a string via MiniMessage final static StringparseLegacyThroughMiniMessage(String message)Parses a string through both legacy and minimessage serializers. final static TagResolvertagResolver(String string, String tag)final TagResolvertagResolver(String string, Component tag)final MiniMessagegetMINI_MESSAGE()-
-
Method Detail
-
containsLegacyCodes
final Boolean containsLegacyCodes(String value)
-
setDefaultStyle
final Component setDefaultStyle(Component $self, TextColor color)
-
MINI_MESSAGE_PLAYER
final static MiniMessage MINI_MESSAGE_PLAYER(Player player)
-
parseMiniMessage
final static String parseMiniMessage(String message, TagResolver tagResolver)
-
parseLegacy
final static String parseLegacy(String message)
Parses the string by deserializing it to a legacy component, then serializing it to a string via MiniMessage
- Parameters:
message- The string to parse- Returns:
The parsed string
-
parseLegacyThroughMiniMessage
final static String parseLegacyThroughMiniMessage(String message)
Parses a string through both legacy and minimessage serializers. This is useful for parsing strings that may contain legacy formatting codes and modern adventure-tags.
- Parameters:
message- The component to parse- Returns:
The parsed string
-
tagResolver
final static TagResolver tagResolver(String string, String tag)
-
tagResolver
final TagResolver tagResolver(String string, Component tag)
-
getMINI_MESSAGE
final MiniMessage getMINI_MESSAGE()
-
-
-
-