EssentialsX /afk command with reason icon

EssentialsX /afk command with reason -----

Adds /afk command with optional reason (EssentialsX required)



/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
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
Resource Information
Author:
----------
Total Downloads: 581
First Release: Feb 13, 2022
Last Update: Aug 27, 2023
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings