Per-user toggles disabled by default

This commit is contained in:
U-NIFLHEIM\Lax 2017-12-29 06:33:04 -08:00 committed by Trent Hensler
parent 738efe8c50
commit fcc7c3af78

View file

@ -100,7 +100,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
BigDecimal result = ess.getSettings().getStartingBalance(); BigDecimal result = ess.getSettings().getStartingBalance();
BigDecimal maxMoney = ess.getSettings().getMaxMoney(); BigDecimal maxMoney = ess.getSettings().getMaxMoney();
BigDecimal minMoney = ess.getSettings().getMinMoney(); BigDecimal minMoney = ess.getSettings().getMinMoney();
// NPC banks are not actual player banks, as such they do not have player starting balance. // NPC banks are not actual player banks, as such they do not have player starting balance.
if (isNPC()) { if (isNPC()) {
result = BigDecimal.ZERO; result = BigDecimal.ZERO;
@ -806,7 +806,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
if (!config.isConfigurationSection("timestamps.command-cooldowns")) { if (!config.isConfigurationSection("timestamps.command-cooldowns")) {
return null; return null;
} }
// See saveCommandCooldowns() for deserialization explanation // See saveCommandCooldowns() for deserialization explanation
List<Map<?, ?>> section = config.getMapList("timestamps.command-cooldowns"); List<Map<?, ?>> section = config.getMapList("timestamps.command-cooldowns");
HashMap<Pattern, Long> result = new HashMap<>(); HashMap<Pattern, Long> result = new HashMap<>();
@ -845,19 +845,19 @@ public abstract class UserData extends PlayerExtension implements IConf {
saveCommandCooldowns(); saveCommandCooldowns();
} }
} }
public boolean clearCommandCooldown(Pattern pattern) { public boolean clearCommandCooldown(Pattern pattern) {
if (this.commandCooldowns == null) { if (this.commandCooldowns == null) {
return false; // false for no modification return false; // false for no modification
} }
if(this.commandCooldowns.remove(pattern) != null) { if(this.commandCooldowns.remove(pattern) != null) {
saveCommandCooldowns(); saveCommandCooldowns();
return true; return true;
} }
return false; return false;
} }
private void saveCommandCooldowns() { private void saveCommandCooldowns() {
// Serialization explanation: // Serialization explanation:
// //
@ -898,10 +898,10 @@ public abstract class UserData extends PlayerExtension implements IConf {
save(); save();
} }
private boolean confirmPay = true; // players accept pay confirmation by default private boolean confirmPay = false; // players deny pay confirmation by default
public boolean _getConfirmPay() { public boolean _getConfirmPay() {
return config.getBoolean("confirm-pay", true); return config.getBoolean("confirm-pay", false);
} }
public boolean isPromptingPayConfirm() { public boolean isPromptingPayConfirm() {
@ -914,10 +914,10 @@ public abstract class UserData extends PlayerExtension implements IConf {
save(); save();
} }
private boolean confirmClear = true; // players accept clear confirmation by default private boolean confirmClear = false; // players deny clear confirmation by default
public boolean _getConfirmClear() { public boolean _getConfirmClear() {
return config.getBoolean("confirm-clear", true); return config.getBoolean("confirm-clear", false);
} }
public boolean isPromptingClearConfirm() { public boolean isPromptingClearConfirm() {