mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
/balance offline players. Send message to initiator of eco commands
This commit is contained in:
parent
2086b8c978
commit
962b6848c4
2 changed files with 4 additions and 8 deletions
|
@ -31,7 +31,7 @@ public class Commandbalance extends EssentialsCommand
|
||||||
|| !(user.isAuthorized("essentials.balance.others")
|
|| !(user.isAuthorized("essentials.balance.others")
|
||||||
|| user.isAuthorized("essentials.balance.other"))
|
|| user.isAuthorized("essentials.balance.other"))
|
||||||
? user
|
? user
|
||||||
: getPlayer(server, args, 0)).getMoney();
|
: getPlayer(server, args, 0, true)).getMoney();
|
||||||
user.sendMessage(Util.format("balance", Util.formatCurrency(bal)));
|
user.sendMessage(Util.format("balance", Util.formatCurrency(bal)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,19 +55,15 @@ public class Commandeco extends EssentialsCommand
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
User u = ess.getUser(args[1]);
|
User u = getPlayer(server, args, 0, true);
|
||||||
if (u == null)
|
|
||||||
{
|
|
||||||
u = ess.getOfflineUser(args[1]);
|
|
||||||
}
|
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case GIVE:
|
case GIVE:
|
||||||
u.giveMoney(amount);
|
u.giveMoney(amount, sender);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAKE:
|
case TAKE:
|
||||||
u.takeMoney(amount);
|
u.takeMoney(amount, sender);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RESET:
|
case RESET:
|
||||||
|
|
Loading…
Reference in a new issue