diff options
author | ementalo <ementalo@gmx.co.uk> | 2011-07-08 12:24:32 +0100 |
---|---|---|
committer | ementalo <ementalo@gmx.co.uk> | 2011-07-08 12:24:32 +0100 |
commit | 962b6848c434932f882f504e9dc7e7cf6239e8b4 (patch) | |
tree | f33900ea60f7e4323b3dd39918b188af3ce610a2 | |
parent | 2086b8c978ad1fe1cd424c5f3485dcc0a62638f1 (diff) | |
download | Essentials-962b6848c434932f882f504e9dc7e7cf6239e8b4.tar Essentials-962b6848c434932f882f504e9dc7e7cf6239e8b4.tar.gz Essentials-962b6848c434932f882f504e9dc7e7cf6239e8b4.tar.lz Essentials-962b6848c434932f882f504e9dc7e7cf6239e8b4.tar.xz Essentials-962b6848c434932f882f504e9dc7e7cf6239e8b4.zip |
/balance offline players. Send message to initiator of eco commands
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandbalance.java | 2 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandeco.java | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java index 13a722d0e..53845cb3b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java @@ -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))); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java index aa726eeae..e64d42946 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java @@ -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: |