diff options
author | Necrodoom <doomed.war@gmail.com> | 2013-03-25 15:09:09 +0200 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-03-29 03:16:18 +0000 |
commit | 8604debc4e104658f4bbb7f1ff80425fa0748565 (patch) | |
tree | 35edac71a09ff82f79c59839f3cee71566b822a2 | |
parent | 22efa3e000230fe50b0afbe594240e9a15ad2452 (diff) | |
download | Essentials-8604debc4e104658f4bbb7f1ff80425fa0748565.tar Essentials-8604debc4e104658f4bbb7f1ff80425fa0748565.tar.gz Essentials-8604debc4e104658f4bbb7f1ff80425fa0748565.tar.lz Essentials-8604debc4e104658f4bbb7f1ff80425fa0748565.tar.xz Essentials-8604debc4e104658f4bbb7f1ff80425fa0748565.zip |
[Fix] Allow console to afk others
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandafk.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java index 1c9e5ea16..f42676942 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import org.bukkit.command.CommandSender; import org.bukkit.Server; @@ -25,6 +26,20 @@ public class Commandafk extends EssentialsCommand toggleAfk(user); } } + + @Override + public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception + { + if (args.length > 0) + { + User afkUser = getPlayer(server, args, 0, true, false); + toggleAfk(afkUser); + } + else + { + throw new NotEnoughArgumentsException(); + } + } private void toggleAfk(User user) { @@ -53,3 +68,4 @@ public class Commandafk extends EssentialsCommand } } } + |