mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-07 13:03:00 +00:00
Make chat handling more thread safe (and also faster)
This commit is contained in:
parent
52702894af
commit
1a07815f4b
4 changed files with 132 additions and 45 deletions
|
@ -440,14 +440,14 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||
|
||||
public List<String> getIgnoredPlayers()
|
||||
{
|
||||
return config.getStringList("ignore");
|
||||
return Collections.synchronizedList(config.getStringList("ignore"));
|
||||
}
|
||||
|
||||
public void setIgnoredPlayers(List<String> players)
|
||||
{
|
||||
if (players == null || players.isEmpty())
|
||||
{
|
||||
ignoredPlayers = new ArrayList<String>();
|
||||
ignoredPlayers = Collections.synchronizedList(new ArrayList<String>());
|
||||
config.removeProperty("ignore");
|
||||
}
|
||||
else
|
||||
|
@ -466,7 +466,7 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||
{
|
||||
return false;
|
||||
}
|
||||
return isIgnoredPlayer(user);
|
||||
return isIgnoredPlayer(user);
|
||||
}
|
||||
|
||||
public boolean isIgnoredPlayer(IUser user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue