Class DatMessageFormatter
java.lang.Object
com.datdeveloper.datmoddingapi.util.DatMessageFormatter
A class for formatting
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.network.chat.Component
formatChatString
(String formatString, Object... args) Format the given chat string into a chat component using objects passed as arguments
A shortcut function forDatMessageFormatter
When an error is encountered in theDatMessageFormatter
Then it is caught and dumped in the chat message.net.minecraft.network.chat.Component
parse()
Parse the given formatString using the arguments
-
Constructor Details
-
DatMessageFormatter
-
-
Method Details
-
formatChatString
public static net.minecraft.network.chat.Component formatChatString(String formatString, Object... args) Format the given chat string into a chat component using objects passed as arguments
A shortcut function forDatMessageFormatter
When an error is encountered in theDatMessageFormatter
Then it is caught and dumped in the chat message.DatMessageFormatter
should be used directly if you desire handling the error yourself.- Parameters:
formatString
- The string that is processedargs
- The arguments to use to format the string- Returns:
- A chat component containing the formatted text
- See Also:
-
parse
Parse the given formatString using the arguments- Returns:
- The processed message
- Throws:
ChatParseException
- Thrown when an exception is encountered whilst parsing the string
-