HomeJavaModsEssentialsX /afk command with reason
EssentialsX /afk command with reason
/AFK COMMAND WITH REASON

WARNING: requirements:
Also, players need to have essentials.afk and essentials.me permission.

This skript adds one simple command. It "upgrades" classic Essentials /afk command.
Players can use
/afk command with optional reason!


Usage: /afk [reason]
Example: /afk goes to the toilet
/afk (You don't have to input the reason - executes classic Essentials afk command)

Output with reason:
[​IMG]


Copy&Paste the Skript
Spoiler: Source code
With mute check (skript-placeholders extension needed):
Code (skript (Unknown Language)):
#SKRIPT: /AFK command with optional reason (1.2 with muted check)
#Requirements:
# EssentialsX (https://essentialsx.net/) plugin
# skript-placeholders (https://github.com/APickledWalrus/skript-placeholders) extension
#MIT License - feel free to fully edit!
#Made by PetyXbron (https://github.com/petyxbron)
command /afk [<text>]:
description: "Executes EssentialsX afk command but with optional reason"
usage: /afk [reason]
executable by: players
trigger:
set {_isMuted} to placeholder "essentials_is_muted" from player #uses skript-placeholders
if arg-1 is not set:
execute console command "sudo %player% essentials:afk" #uses EssentialsX
stop
if arg-1 is set:
if {_isMuted} is "no": #uses skript-placeholders
execute console command "sudo %player% essentials:me %arg-1%" #uses EssentialsX
execute console command "sudo %player% essentials:afk" #uses EssentialsX
stop
...or you can just download the file and import it to your server!

Without mute check:
Code (skript (Unknown Language)):
#SKRIPT: /AFK command with optional reason (1.2 without muted check)
#Requirements:
# EssentialsX (https://essentialsx.net/) plugin
#MIT License - feel free to fully edit!
#Made by PetyXbron (https://github.com/petyxbron)
command /afk [<text>]:
description: "Executes EssentialsX afk command but with optional reason"
usage: /afk [reason]
executable by: players
trigger:
if arg-1 is not set:
execute console command "sudo %player% essentials:afk" #uses EssentialsX
stop
if arg-1 is set:
execute console command "sudo %player% essentials:me %arg-1%" #uses EssentialsX
execute console command "sudo %player% essentials:afk" #uses EssentialsX
stop
You can also get both Skript versions in this GitHub Gist.
Raw files: afk-1.2-mutecheck.sk, afk-1.2.sk
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

EssentialsX /afk command with reason is a free Minecraft Java mod. Compatible with Minecraft 1.18, 1.19, 1.20. Downloaded 612 times (via Spigot). Download it and open it directly in the game.

Explore more