mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-16 23:55:28 +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);
|
afkUser = getPlayer(server, user, args, 0);
|
||||||
message = args.length > 1 ? getFinalArg(args, 1) : null;
|
message = args.length > 1 ? getFinalArg(args, 1) : null;
|
||||||
} catch (PlayerNotFoundException e) {
|
} 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);
|
message = getFinalArg(args, 0);
|
||||||
}
|
}
|
||||||
toggleAfk(user, afkUser, message);
|
toggleAfk(user, afkUser, message);
|
||||||
|
Loading…
Reference in New Issue
Block a user