Implement toggle for command block logging (#2599)

Just a simple config toggle for whether or not command block commands should be logged.

closes #1153, closes #162

---

* Add toggle for command block logs
* update setting name
This commit is contained in:
triagonal 2019-08-06 01:17:22 +10:00 committed by md678685
parent ff9f712d65
commit 95f2852cf3
4 changed files with 21 additions and 1 deletions

View file

@ -554,6 +554,7 @@ public class Settings implements net.ess3.api.ISettings {
allowOldIdSigns = _allowOldIdSigns();
isWaterSafe = _isWaterSafe();
isSafeUsermap = _isSafeUsermap();
logCommandBlockCommands = _logCommandBlockCommands();
}
void _lateLoadItemSpawnBlacklist() {
@ -1576,4 +1577,15 @@ public class Settings implements net.ess3.api.ISettings {
public boolean isSafeUsermap() {
return isSafeUsermap;
}
private boolean logCommandBlockCommands;
private boolean _logCommandBlockCommands() {
return config.getBoolean("log-command-block-commands", true);
}
@Override
public boolean logCommandBlockCommands() {
return logCommandBlockCommands;
}
}