Add blacklist of commands for muted players. Adds #30.

This commit is contained in:
drtshock 2015-05-12 21:44:36 -05:00
parent 6796d460dc
commit d6eb846488
4 changed files with 37 additions and 0 deletions

View file

@ -254,6 +254,24 @@ public class Settings implements net.ess3.api.ISettings {
return socialSpyCommands;
}
private Set<String> muteCommands = new HashSet<String>();
private Set<String> _getMuteCommands() {
Set<String> muteCommands = new HashSet<String>();
if(config.isList("mute-commands")) {
for(String s : config.getStringList("mute-commands")) {
muteCommands.add(s.toLowerCase(Locale.ENGLISH));
}
}
return muteCommands;
}
@Override
public Set<String> getMuteCommands() {
return muteCommands;
}
private String nicknamePrefix = "~";
private String _getNicknamePrefix() {
@ -489,6 +507,7 @@ public class Settings implements net.ess3.api.ISettings {
isCustomJoinMessage = !customJoinMessage.equals("none");
customQuitMessage = _getCustomQuitMessage();
isCustomQuitMessage = !customQuitMessage.equals("none");
muteCommands = _getMuteCommands();
}
private List<Integer> itemSpawnBl = new ArrayList<Integer>();