mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 21:43:54 +00:00
add clearchat
This commit is contained in:
@ -31,6 +31,9 @@ public class VPlayer implements ConfigLoadable, ConfigSavable, Validatable
|
||||
@Getter
|
||||
@Setter
|
||||
private String tag = null;
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean clearChatOptOut = false;
|
||||
|
||||
public VPlayer(String name)
|
||||
{
|
||||
@ -51,6 +54,7 @@ public class VPlayer implements ConfigLoadable, ConfigSavable, Validatable
|
||||
discordId = cs.getString("discordId", null);
|
||||
enabled = cs.getBoolean("enabled", false);
|
||||
tag = cs.getString("tag", null);
|
||||
clearChatOptOut = cs.getBoolean("clearchatoptout", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -62,6 +66,7 @@ public class VPlayer implements ConfigLoadable, ConfigSavable, Validatable
|
||||
cs.set("enabled", enabled);
|
||||
cs.set("tag", tag);
|
||||
cs.set("ips", Lists.newArrayList(ips));
|
||||
cs.set("clearchatoptout", clearChatOptOut);
|
||||
}
|
||||
|
||||
public List<String> getIps()
|
||||
@ -71,12 +76,12 @@ public class VPlayer implements ConfigLoadable, ConfigSavable, Validatable
|
||||
|
||||
public boolean addIp(String ip)
|
||||
{
|
||||
return ips.contains(ip) ? false : ips.add(ip);
|
||||
return !ips.contains(ip) && ips.add(ip);
|
||||
}
|
||||
|
||||
public boolean removeIp(String ip)
|
||||
public void removeIp(String ip)
|
||||
{
|
||||
return ips.remove(ip);
|
||||
ips.remove(ip);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user