Restrict posting message from MC to TG if chat msg event was cancelled

This commit is contained in:
ChronosX88 2022-01-15 16:38:07 +03:00
parent 3c93b1cc62
commit 94ef98502e
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A
2 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ class EventHandler(
@EventHandler
fun onPlayerChat(event: AsyncPlayerChatEvent) {
if (!config.logFromMCtoTG) return
if (event.isCancelled()) return;
event.run {
sendMessage(message, player.displayName)
}

View File

@ -1,5 +1,5 @@
name: SpigotTGBridge
version: "0.19"
version: "0.20-alpha"
api-version: "1.15"
main: org.kraftwerk28.spigot_tg_bridge.Plugin
description: Telegram <-> Minecraft communication plugin for Spigot.