Allow players to set single word AFK message - fixes #2712 (#2876)

Allows players with "essentials.afk.others" to toggle afk themselves with a single word message
This commit is contained in:
Johnny Cao 2019-12-11 19:20:56 +00:00 committed by md678685
parent e720fb528a
commit e0f19f8121

View File

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