mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
parent
5af9536db1
commit
70de83827d
@ -43,8 +43,18 @@ public class Commandpay extends EssentialsLoopCommand {
|
||||
throw new Exception(tl("minimumPayAmount", NumberUtil.displayCurrencyExactly(ess.getSettings().getMinimumPayAmount(), ess)));
|
||||
}
|
||||
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 {
|
||||
if (player.getBase() != null && !player.getBase().isOnline() && !canPayOffline) {
|
||||
user.sendMessage(tl("payOffline"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!player.isAcceptingPay() || (ess.getSettings().isPayExcludesIgnoreList() && player.isIgnoredPlayer(user))) {
|
||||
user.sendMessage(tl("notAcceptingPay", player.getDisplayName()));
|
||||
return;
|
||||
|
@ -567,6 +567,7 @@ payConfirmToggleOn=\u00a76You will now be prompted to confirm payments.
|
||||
payDisabledFor=\u00a76Disabled accepting payments for \u00a7c{0}\u00a76.
|
||||
payEnabledFor=\u00a76Enabled accepting payments for \u00a7c{0}\u00a76.
|
||||
payMustBePositive=\u00a74Amount to pay must be positive.
|
||||
payOffline=\u00a74You cannot pay offline users.
|
||||
payToggleOff=\u00a76You are no longer accepting payments.
|
||||
payToggleOn=\u00a76You are now accepting payments.
|
||||
payconfirmtoggleCommandDescription=Toggles whether you are prompted to confirm payments.
|
||||
|
Loading…
Reference in New Issue
Block a user