mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-26 18:11:52 +01:00
Default setting to be enabled confirm commands by default with commented out list of possible options
This commit is contained in:
parent
ce1e584266
commit
a468ec5e08
@ -303,7 +303,7 @@ public interface ISettings extends IConf {
|
||||
|
||||
boolean isDirectHatAllowed();
|
||||
|
||||
List<String> getDefaultDisabledConfirmCommands();
|
||||
List<String> getDefaultEnabledConfirmCommands();
|
||||
|
||||
boolean isConfirmCommandEnabledByDefault(String commandName);
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user