update 1.0.13
- added the class Cancellable that allows developers to cancel the two implemented API methods shown below.
Example usage:
import de.Linus122.TelegramChat.TelegramActionListener;
import de.Linus122.TelegramComponents.Chat;
import de.Linus122.TelegramComponents.ChatMessageToMc;
public class TelegramListener implements TelegramActionListener {
@Override
public void onSendToMinecraft(ChatMessageToMc msg) {
if (msg.text.contains("swearword")) {
msg.setCancelled();
}
}
@Override
public void onSendToTelegram(ChatMessageToTelegram msg) {
if (msg.content.contains("swearword")) {
msg.setCancelled();
}
}
}