Default setting to be enabled confirm commands by default with commented out list of possible options

This commit is contained in:
Trent Hensler 2018-03-26 00:24:10 -07:00
parent ce1e584266
commit a468ec5e08
3 changed files with 10 additions and 10 deletions

View File

@ -303,7 +303,7 @@ public interface ISettings extends IConf {
boolean isDirectHatAllowed();
List<String> getDefaultDisabledConfirmCommands();
List<String> getDefaultEnabledConfirmCommands();
boolean isConfirmCommandEnabledByDefault(String commandName);
}

View File

@ -532,7 +532,7 @@ public class Settings implements net.ess3.api.ISettings {
npcsInBalanceRanking = _isNpcsInBalanceRanking();
currencyFormat = _getCurrencyFormat();
unprotectedSigns = _getUnprotectedSign();
defaultDisabledConfirmCommands = _getDefaultDisabledConfirmCommands();
defaultEnabledConfirmCommands = _getDefaultEnabledConfirmCommands();
}
private List<Integer> itemSpawnBl = new ArrayList<Integer>();
@ -1420,10 +1420,10 @@ public class Settings implements net.ess3.api.ISettings {
return config.getBoolean("allow-direct-hat", true);
}
private List<String> defaultDisabledConfirmCommands;
private List<String> defaultEnabledConfirmCommands;
private List<String> _getDefaultDisabledConfirmCommands() {
List<String> commands = config.getStringList("default-disabled-confirm-commands");
private List<String> _getDefaultEnabledConfirmCommands() {
List<String> commands = config.getStringList("default-enabled-confirm-commands");
for (int i = 0; i < commands.size(); i++) {
commands.set(i, commands.get(i).toLowerCase());
}
@ -1431,12 +1431,12 @@ public class Settings implements net.ess3.api.ISettings {
}
@Override
public List<String> getDefaultDisabledConfirmCommands() {
return defaultDisabledConfirmCommands;
public List<String> getDefaultEnabledConfirmCommands() {
return defaultEnabledConfirmCommands;
}
@Override
public boolean isConfirmCommandEnabledByDefault(String commandName) {
return !getDefaultDisabledConfirmCommands().contains(commandName.toLowerCase());
return getDefaultEnabledConfirmCommands().contains(commandName.toLowerCase());
}
}

View File

@ -516,9 +516,9 @@ allow-bulk-buy-sell: true
# This has no effect if the MOTD command or permission are disabled.
delay-motd: 0
# A list of commands that should have their complementary confirm commands disabled by default.
# A list of commands that should have their complementary confirm commands enabled by default.
# This is empty by default, for the latest list of valid commands see the latest source config.yml.
default-disabled-confirm-commands:
default-enabled-confirm-commands:
#- pay
#- clearinventory