is someone able to write a simple greentext plugin when inserting “>”
Try KtSkript with this script:
registerListener<MessageChannelEvent.Chat> {
if (rawMessage.toPlain().startsWith(">")) {
setMessage("<${causingPlayer.name}> ".toText() + rawMessage.green())
}
}
>using setMessage
for chat instead of the MessageFormatter
and setBody
Currently don’t have the java docs here, nor any source. You could correct it if you like
Assuming the receiver is the event, it’d be
registerListener<MessageChannelEvent.Chat> {
if (rawMessage.toPlain().startsWith(">")) {
formatter.setBody(rawMessage.green())
}
}
1 Like
You using ktscript? Or still wanting this?