feat: option to enable ClearChatNameAnnouncerPlugin in config

This commit is contained in:
ChomeNS
2025-02-12 07:03:54 +07:00
parent 10a7f1ab1c
commit 186d2a4f4c
4 changed files with 9 additions and 1 deletions

View File

@@ -1 +1 @@
1504
1505

View File

@@ -35,6 +35,8 @@ public class Configuration {
public ImposterFormatChecker imposterFormatChecker = new ImposterFormatChecker();
public OwnerAuthentication ownerAuthentication = new OwnerAuthentication();
public boolean announceClearChatUsername = false;
public List<String> trusted = new ArrayList<>();
public SelfCare selfCare = new SelfCare();

View File

@@ -11,6 +11,8 @@ public class ClearChatNameAnnouncerPlugin extends CommandSpyPlugin.Listener {
public ClearChatNameAnnouncerPlugin (Bot bot) {
this.bot = bot;
if (!bot.config.announceClearChatUsername) return;
bot.commandSpy.addListener(this);
}

View File

@@ -79,6 +79,10 @@ ownerAuthentication:
ips:
localhost:25565: '127.0.0.1'
# if this is enabled when someone does a clear chat command the bot
# will tellraw `{player} cleared the chat`
announceClearChatUsername: false
trusted:
- 'player name'