mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-10 12:59:54 +01:00
/balance offline players. Send message to initiator of eco commands
This commit is contained in:
parent
2086b8c978
commit
962b6848c4
@ -31,7 +31,7 @@ public class Commandbalance extends EssentialsCommand
|
||||
|| !(user.isAuthorized("essentials.balance.others")
|
||||
|| user.isAuthorized("essentials.balance.other"))
|
||||
? user
|
||||
: getPlayer(server, args, 0)).getMoney();
|
||||
: getPlayer(server, args, 0, true)).getMoney();
|
||||
user.sendMessage(Util.format("balance", Util.formatCurrency(bal)));
|
||||
}
|
||||
}
|
||||
|
@ -55,19 +55,15 @@ public class Commandeco extends EssentialsCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
User u = ess.getUser(args[1]);
|
||||
if (u == null)
|
||||
{
|
||||
u = ess.getOfflineUser(args[1]);
|
||||
}
|
||||
User u = getPlayer(server, args, 0, true);
|
||||
switch (cmd)
|
||||
{
|
||||
case GIVE:
|
||||
u.giveMoney(amount);
|
||||
u.giveMoney(amount, sender);
|
||||
break;
|
||||
|
||||
case TAKE:
|
||||
u.takeMoney(amount);
|
||||
u.takeMoney(amount, sender);
|
||||
break;
|
||||
|
||||
case RESET:
|
||||
|
Loading…
Reference in New Issue
Block a user