summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandafk.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
index 6a5d6dc26..7e1d6b0e6 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
@@ -17,11 +17,8 @@ public class Commandafk extends EssentialsCommand
{
if (args.length > 0 && user.isAuthorized("essentials.afk.others"))
{
- User afkUser = ess.getUser(ess.getServer().matchPlayer(args[0]));
- if (afkUser != null)
- {
- toggleAfk(afkUser);
- }
+ User afkUser = getPlayer(server, args, 0);
+ toggleAfk(afkUser);
}
else
{