/balance offline players. Send message to initiator of eco commands

This commit is contained in:
ementalo 2011-07-08 12:24:32 +01:00
parent 2086b8c978
commit 962b6848c4
2 changed files with 4 additions and 8 deletions

View File

@ -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)));
}
}

View File

@ -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: