kraftwerk28 / spigot-tg-bridge

Connect Telegram chats and Minecraft servers seamlessly
https://www.spigotmc.org/resources/telegram-bridge.75175/
GNU General Public License v3.0
38 stars 13 forks source link

silentjoinleave permission #32

Open pbl0 opened 1 month ago

pbl0 commented 1 month ago

This pull request implements a new permission, tg-bridge.silentjoinleave, which prevents the bot from sending join and leave messages for specific players. Additionally, it hides these players from the online command.

Summary of Changes

My use case: Sometimes, I like to join my server in vanish mode so I can spectate players without them knowing. However, notifying them on Telegram whenever I join kinda defeats the purpose. I would set this permission to true and join the server. Set it back to false when I want other players to know I'm around.

Edit: Now that I think about it, perhaps it should also prevent sending messages on the other event handlers if the player has the permission (sleep, die and chat).

pbl0 commented 1 month ago

Applied the changes I said on the edit message. Left the chat event as is as most vanish plugins prevent the player to chat anyways and allow to bypass it if needed.