fix: prevent whitelist from kicking the bot itself
This commit is contained in:
parent
11f478487d
commit
7b78ce7d06
1 changed files with 2 additions and 2 deletions
|
@ -72,7 +72,7 @@ public class WhitelistPlugin extends PlayersPlugin.Listener {
|
|||
}
|
||||
|
||||
public void commandReceived (PlayerEntry entry, String command) {
|
||||
if (!enabled || list.contains(entry.profile.getName())) return;
|
||||
if (!enabled || list.contains(entry.profile.getName()) || entry.profile.equals(bot.profile)) return;
|
||||
|
||||
if (
|
||||
command.startsWith("mute") ||
|
||||
|
@ -90,7 +90,7 @@ public class WhitelistPlugin extends PlayersPlugin.Listener {
|
|||
}
|
||||
|
||||
private void handle (PlayerEntry entry) {
|
||||
if (!enabled || list.contains(entry.profile.getName())) return;
|
||||
if (!enabled || list.contains(entry.profile.getName()) || entry.profile.equals(bot.profile)) return;
|
||||
|
||||
bot.filter.doAll(entry);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue