Package com.petarmc.lib.chat
Class ChatMatch
java.lang.Object
com.petarmc.lib.chat.ChatMatch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGroup(int group) Get a captured group by indexintGet the number of captured groups
-
Field Details
-
originalMessage
-
matcher
-
patternId
-
-
Constructor Details
-
ChatMatch
-
-
Method Details
-
getOriginalMessage
- Returns:
- The original chat message that was matched
-
getMatcher
- Returns:
- The regex matcher containing captured groups
-
getPatternId
- Returns:
- The ID of the pattern that matched
-
getGroup
Get a captured group by index- Parameters:
group- The group index (1-based)- Returns:
- The captured string, or null if group doesn't exist
-
getGroupCount
public int getGroupCount()Get the number of captured groups
-