mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-04 19:46:27 +00:00
Create /paytoggle
command. Resolves #413
This commit is contained in:
parent
f1d9cda5eb
commit
2493c655f8
29 changed files with 131 additions and 0 deletions
|
@ -44,6 +44,10 @@ public class Commandpay extends EssentialsLoopCommand {
|
|||
protected void updatePlayer(final Server server, final CommandSource sender, final User player, final String[] args) throws ChargeException {
|
||||
User user = ess.getUser(sender.getPlayer());
|
||||
try {
|
||||
if (!player.isAcceptingPay()) {
|
||||
sender.sendMessage(tl("notAcceptingPay", player.getDisplayName()));
|
||||
return;
|
||||
}
|
||||
user.payUser(player, amount);
|
||||
Trade.log("Command", "Pay", "Player", user.getName(), new Trade(amount, ess), player.getName(), new Trade(amount, ess), user.getLocation(), ess);
|
||||
} catch (MaxMoneyException ex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue