Hi. I'm new to making plugins, and want to write some code that formats the chat message when typed. For example,
This is what IntelliJ autocomplete has got me. And honestly I have no idea where to even start.
How should I go about it?
- Before: <abc> hello! &6this is gold text!
- After: [rank] abc: hello! this is gold text!
Java:
@EventHandler
public void onPlayerChatEvent(AsyncChatEvent event) {
event.message().replaceText(new TextReplacementConfig() {
@Override
public @NotNull Pattern matchPattern() {
return null;
}
@Override
public @NotNull Builder toBuilder() {
return null;
}
})
}
This is what IntelliJ autocomplete has got me. And honestly I have no idea where to even start.
How should I go about it?