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:
Ali Moghnieh 2016-12-25 18:08:16 +00:00
parent 442d97a1b1
commit 5f83766dc1
No known key found for this signature in database
GPG key ID: F09D3A1BAF2E6D70
6 changed files with 60 additions and 1 deletions

View file

@ -59,7 +59,7 @@ public class Commandpay extends EssentialsLoopCommand {
sender.sendMessage(tl("notAcceptingPay", player.getDisplayName()));
return;
}
if (!amount.equals(user.getConfirmingPayments().get(player))) { // checks if exists and if command needs to be repeated.
if (user.isPromptingPayConfirm() && !amount.equals(user.getConfirmingPayments().get(player))) { // checks if exists and if command needs to be repeated.
// Used to reset confirmations and inform to confirm when a new pay command has been inserted.
if (!informToConfirm) {
// User hasnt been asked to confirm payment to this player, reset all confirmed payments and ask to confirm again.