mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-16 15:45:58 +01:00
Allows players with "essentials.afk.others" to toggle afk themselves with a single word message
This commit is contained in:
parent
e720fb528a
commit
e0f19f8121
@ -24,10 +24,6 @@ public class Commandafk extends EssentialsCommand {
|
||||
afkUser = getPlayer(server, user, args, 0);
|
||||
message = args.length > 1 ? getFinalArg(args, 1) : null;
|
||||
} catch (PlayerNotFoundException e) {
|
||||
// If only one arg is passed, assume the command executor is targeting another player.
|
||||
if (args.length == 1) {
|
||||
throw e;
|
||||
}
|
||||
message = getFinalArg(args, 0);
|
||||
}
|
||||
toggleAfk(user, afkUser, message);
|
||||
|
Loading…
Reference in New Issue
Block a user