mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-06-25 22:25:05 +02:00
Prevent users being duplicated in the ignore list
Fixes #2064, as well as alleviating the issue encountered in kangarko/ChatControl-Pro#627 for EssentialsX users.
This commit is contained in:
parent
849efa9756
commit
a44775cafb
|
@ -467,10 +467,11 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
}
|
||||
|
||||
public void setIgnoredPlayer(IUser user, boolean set) {
|
||||
final String entry = user.getName().toLowerCase(Locale.ENGLISH);
|
||||
if (set) {
|
||||
ignoredPlayers.add(user.getName().toLowerCase(Locale.ENGLISH));
|
||||
if (!ignoredPlayers.contains(entry)) ignoredPlayers.add(entry);
|
||||
} else {
|
||||
ignoredPlayers.remove(user.getName().toLowerCase(Locale.ENGLISH));
|
||||
ignoredPlayers.remove(entry);
|
||||
}
|
||||
setIgnoredPlayers(ignoredPlayers);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user