mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-04 19:46:27 +00:00
Implement player based toggle for pay confirmation prompts. Fixes #1032
This commit adds a new `/payconfirmtoggle` command with `/payconfirmon` and `/payconfirmoff` as well.
This commit is contained in:
parent
442d97a1b1
commit
5f83766dc1
6 changed files with 60 additions and 1 deletions
|
@ -90,6 +90,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
lastAccountName = _getLastAccountName();
|
||||
commandCooldowns = _getCommandCooldowns();
|
||||
acceptingPay = _getAcceptingPay();
|
||||
confirmPay = _getConfirmPay();
|
||||
}
|
||||
|
||||
private BigDecimal money;
|
||||
|
@ -896,6 +897,22 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
save();
|
||||
}
|
||||
|
||||
private boolean confirmPay = true; // players accept pay by default
|
||||
|
||||
public boolean _getConfirmPay() {
|
||||
return config.getBoolean("confirm-pay", true);
|
||||
}
|
||||
|
||||
public boolean isPromptingPayConfirm() {
|
||||
return confirmPay;
|
||||
}
|
||||
|
||||
public void setPromptingPayConfirm(boolean prompt) {
|
||||
this.confirmPay = prompt;
|
||||
config.setProperty("confirm-pay", prompt);
|
||||
save();
|
||||
}
|
||||
|
||||
public UUID getConfigUUID() {
|
||||
return config.uuid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue