mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-05 16:08:14 +01:00
Per-user toggles disabled by default
This commit is contained in:
parent
738efe8c50
commit
fcc7c3af78
@ -100,7 +100,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||
BigDecimal result = ess.getSettings().getStartingBalance();
|
||||
BigDecimal maxMoney = ess.getSettings().getMaxMoney();
|
||||
BigDecimal minMoney = ess.getSettings().getMinMoney();
|
||||
|
||||
|
||||
// NPC banks are not actual player banks, as such they do not have player starting balance.
|
||||
if (isNPC()) {
|
||||
result = BigDecimal.ZERO;
|
||||
@ -806,7 +806,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||
if (!config.isConfigurationSection("timestamps.command-cooldowns")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// See saveCommandCooldowns() for deserialization explanation
|
||||
List<Map<?, ?>> section = config.getMapList("timestamps.command-cooldowns");
|
||||
HashMap<Pattern, Long> result = new HashMap<>();
|
||||
@ -845,19 +845,19 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||
saveCommandCooldowns();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean clearCommandCooldown(Pattern pattern) {
|
||||
if (this.commandCooldowns == null) {
|
||||
return false; // false for no modification
|
||||
}
|
||||
|
||||
|
||||
if(this.commandCooldowns.remove(pattern) != null) {
|
||||
saveCommandCooldowns();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private void saveCommandCooldowns() {
|
||||
// Serialization explanation:
|
||||
//
|
||||
@ -898,10 +898,10 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||
save();
|
||||
}
|
||||
|
||||
private boolean confirmPay = true; // players accept pay confirmation by default
|
||||
private boolean confirmPay = false; // players deny pay confirmation by default
|
||||
|
||||
public boolean _getConfirmPay() {
|
||||
return config.getBoolean("confirm-pay", true);
|
||||
return config.getBoolean("confirm-pay", false);
|
||||
}
|
||||
|
||||
public boolean isPromptingPayConfirm() {
|
||||
@ -914,10 +914,10 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||
save();
|
||||
}
|
||||
|
||||
private boolean confirmClear = true; // players accept clear confirmation by default
|
||||
private boolean confirmClear = false; // players deny clear confirmation by default
|
||||
|
||||
public boolean _getConfirmClear() {
|
||||
return config.getBoolean("confirm-clear", true);
|
||||
return config.getBoolean("confirm-clear", false);
|
||||
}
|
||||
|
||||
public boolean isPromptingClearConfirm() {
|
||||
|
Loading…
Reference in New Issue
Block a user