mirror of
https://github.com/amalthea-mc/spigot-tg-bridge.git
synced 2024-11-23 10:52:26 +00:00
Restrict posting message from MC to TG if chat msg event was cancelled
This commit is contained in:
parent
3c93b1cc62
commit
94ef98502e
@ -17,6 +17,7 @@ class EventHandler(
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
fun onPlayerChat(event: AsyncPlayerChatEvent) {
|
fun onPlayerChat(event: AsyncPlayerChatEvent) {
|
||||||
if (!config.logFromMCtoTG) return
|
if (!config.logFromMCtoTG) return
|
||||||
|
if (event.isCancelled()) return;
|
||||||
event.run {
|
event.run {
|
||||||
sendMessage(message, player.displayName)
|
sendMessage(message, player.displayName)
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: SpigotTGBridge
|
name: SpigotTGBridge
|
||||||
version: "0.19"
|
version: "0.20-alpha"
|
||||||
api-version: "1.15"
|
api-version: "1.15"
|
||||||
main: org.kraftwerk28.spigot_tg_bridge.Plugin
|
main: org.kraftwerk28.spigot_tg_bridge.Plugin
|
||||||
description: Telegram <-> Minecraft communication plugin for Spigot.
|
description: Telegram <-> Minecraft communication plugin for Spigot.
|
||||||
|
Loading…
Reference in New Issue
Block a user