Sueta

Actionbar AFK

1 (updated)

Shows your afk status as actionbar and broadcast

·Plugin

Just a simple AFK plugin (you can't set other players to afk).
here's a showcase gif:

Installation:
1: Download the latest actionbar_afk.jar file
2: Download the latest ActionBarAPI from here: https://www.spigotmc.org/resources/actionbarapi-1-8-1-14-2.1315/
3: Put the both plugins inside your plugins folder
4: Reload/restart your server

Info / Features:

as you do /afk , without permission then it gives you an no-permission error.
with permission:
1: You freeze after you do /afk. And then unfreeze after you do /afk, again
2: after you do the command you see 2 different actionbar messages:
the first one is "You're now AFK! you're frozen" and the second one is "You're no longer AFK! You can move now" (both are customizable).
3: And after the usage of the /afk, command there's being 2 broadcasts to all online players: the first one is: "<player> is now AFK!" the second one is "<player> is no longer AFK!" (both are also customizable).
4: The sounds can be changed.
5: The duration of both actionbars can be changed.


config:

Variable: %player (usage in broadcast section)

#this is a actionbar afk plugin.  
 #the player who use the command /afk  
 #gets a message in the actionbar   
prefix  :  
    no-permission   :   "&8[&cERROR&8]"  
 
no-permission   :   "&cNo permission to do /afk"   
no-console   :   "&cYou can't use this command while in console!"  
 
broadcast  :  
    afk   :   "&f%player &cis now AFK!"   
    no-longer   :   "&f%player &aIs no longer AFK!"  
 
actionbar  :  
    not-afk   :   "&aYou're no longer AFK! You can move now"   
    afk   :   "&cYou're now AFK! you're frozen"  
    
 #to get the sounds of 1.14.4  
 #go to: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html   
sounds  :  
    sound-afk   :   "BLOCK_BELL_USE"   
    sound-no-longer-afk   :   "BLOCK_BELL_USE"  
    
 #Durations are in ticks, so 20 ticks = 1 second   
durations  :  
    afk-actionbar   :  100  
    no-more-afk-actionbar   :  100

Permission:

afk.use 
        description: for the /afk command 
        default: false

Similar projects

Plugin →