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
Added tg-bridge.silentjoinleave permission.
Updated the logic in the bot to check this permission before sending join/leave messages.
Modified the online command to exclude players with this permission.
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).
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.
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 theonline
command.Summary of Changes
tg-bridge.silentjoinleave
permission.online
command to exclude players with this permission.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).