mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-05 23:08:23 +00:00
parent
5af9536db1
commit
70de83827d
2 changed files with 12 additions and 1 deletions
|
@ -43,8 +43,18 @@ public class Commandpay extends EssentialsLoopCommand {
|
||||||
throw new Exception(tl("minimumPayAmount", NumberUtil.displayCurrencyExactly(ess.getSettings().getMinimumPayAmount(), ess)));
|
throw new Exception(tl("minimumPayAmount", NumberUtil.displayCurrencyExactly(ess.getSettings().getMinimumPayAmount(), ess)));
|
||||||
}
|
}
|
||||||
final AtomicBoolean informToConfirm = new AtomicBoolean(false);
|
final AtomicBoolean informToConfirm = new AtomicBoolean(false);
|
||||||
loopOnlinePlayersConsumer(server, user.getSource(), false, user.isAuthorized("essentials.pay.multiple"), args[0], player -> {
|
final boolean canPayOffline = user.isAuthorized("essentials.pay.offline");
|
||||||
|
if (!canPayOffline && args[0].equals("**")) {
|
||||||
|
user.sendMessage(tl("payOffline"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
loopOfflinePlayersConsumer(server, user.getSource(), false, user.isAuthorized("essentials.pay.multiple"), args[0], player -> {
|
||||||
try {
|
try {
|
||||||
|
if (player.getBase() != null && !player.getBase().isOnline() && !canPayOffline) {
|
||||||
|
user.sendMessage(tl("payOffline"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!player.isAcceptingPay() || (ess.getSettings().isPayExcludesIgnoreList() && player.isIgnoredPlayer(user))) {
|
if (!player.isAcceptingPay() || (ess.getSettings().isPayExcludesIgnoreList() && player.isIgnoredPlayer(user))) {
|
||||||
user.sendMessage(tl("notAcceptingPay", player.getDisplayName()));
|
user.sendMessage(tl("notAcceptingPay", player.getDisplayName()));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -567,6 +567,7 @@ payConfirmToggleOn=\u00a76You will now be prompted to confirm payments.
|
||||||
payDisabledFor=\u00a76Disabled accepting payments for \u00a7c{0}\u00a76.
|
payDisabledFor=\u00a76Disabled accepting payments for \u00a7c{0}\u00a76.
|
||||||
payEnabledFor=\u00a76Enabled accepting payments for \u00a7c{0}\u00a76.
|
payEnabledFor=\u00a76Enabled accepting payments for \u00a7c{0}\u00a76.
|
||||||
payMustBePositive=\u00a74Amount to pay must be positive.
|
payMustBePositive=\u00a74Amount to pay must be positive.
|
||||||
|
payOffline=\u00a74You cannot pay offline users.
|
||||||
payToggleOff=\u00a76You are no longer accepting payments.
|
payToggleOff=\u00a76You are no longer accepting payments.
|
||||||
payToggleOn=\u00a76You are now accepting payments.
|
payToggleOn=\u00a76You are now accepting payments.
|
||||||
payconfirmtoggleCommandDescription=Toggles whether you are prompted to confirm payments.
|
payconfirmtoggleCommandDescription=Toggles whether you are prompted to confirm payments.
|
||||||
|
|
Loading…
Reference in a new issue