AFK
Change Log
Check all changes which have been done so far.
Known Bugs
Animals/Players can cancel your AFK status by pushing you.
Using
Write /afk and server will broadcast "player_name is now AFK" message. If you move, type this command again, or type something into chat, server broadcasts opposite message "player_name is no longer AFK". If player is AFK, his name is gray in a player list.
Have outher plugin with /afk command?
then use /afk:afk
If you want to use Afk Time you must add {TIME} key.
ForEx: noAfk: '{DISPLAYNAME} is back after {TIME}!'
Config
# Events: def. true # Colors: def. gray [black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, white] # IdleTimer: def. true, 60 sec # Messages: def. true (keys: {DISPLAYNAME}, {TIME}) Events: move: true chat: true Colors: message: gray player: gray IdleTimer: enabled: true period: 60 Messages: enabled: true nicknames: false +afk: "{DISPLAYNAME} is now AFK" -afk: "{DISPLAYNAME} is no longer AFK"
TO DO
Java 7 | V4.5 | 100 % | done |
Minecraft 1.10 | V4.5.1 | 100 % | done |
Minecraft 1.9 | V4.5 | 100 % | done |
Reason option | V4.5.1 | 100 % | done |
Permissions | 0 % | allmost | |
AFK commands support | 2 % | allmost | |
Reload command | 0 % | none | |
Idle Timer v2 | v4.0.0 | 100 % | done |
AFK Time | v2.1.0 | 100 % | done |
Java 6 | v2.0.2b | 100 % | done |
Idle Timer | v2.0.0 | 100 % | done |
Config | v1.3.0 | 100 % | done |
source code V4.3 & higher | source code V4.2.1 & lower.
Quote:Now that you got an /afk command, would you like an antiswearing plugin? try BSwear
@ThisUsernameIsMine
Hi, try next version (4.1.0) I hope it's fixed.
@ schneckk: Is it normal that the displayname values overrule the message and player colors? (tested 4.0.4)
I've set message and player color to: 'gold', but those colors are overruled by our player name's group color (which aren't gold).
I already tried to solve this by entering a color code in the afk-message itself but without result: http://i.imgur.com/JNhrmld.png
I hope you understand ;-)
@schneckk
No nicknames, but we do use color(ed prefixe)s:
- http://i.imgur.com/r2xoI1X.png
@ThisUsernameIsMine
Thank you, uploading new version - I'm trying to return to displaying PlayerName instead PlayerListName in messages.
Do you have some colors or nickname in your game? I think it was caused by block of code that shortens the name...
The new version gives an unhandled exception / NPE when typing /afk:
Unhandled exception executing command 'afk' in plugin AFK v4.0.2
Caused by: java.lang.NullPointerException
complete error: http://dev.bukkit.org/paste/8423/
Thanks to Ben Woodford from UK afk messages now supports color codes directly from config file!
I did some changes in displaying name in messages. Now it should display name like in player list. Please test it.
How do you set it so when go AFK, it shows your display name/nick instead of your full username? I use Essentials for my nicks.
I have a problem with the AFK Timer. When I set {time} in the text it show
+afk: '{DISPLAYNAME} is now AFK' -afk: '{DISPLAYNAME} was AFK in {time}'
I can be afk in 5 second and when I move it will show me 'TheR3ktor was afk in 3721m59s? I hope you understand my bad english. :)
@ApexDev
Hey, thanks! :)
Nice choice of song for the video. ;)
@schneckk
richtig ;-)
@ThisUsernameIsMine
So it works, I hope so?
For some reason (under 4.0.0 and 4.0.1) the AFK-message is shown as:
CraftPlayer{name=example_name} is now AFK
(example_name is something i chose as an example)
The message that is shown when someone comes out of AFK is correctly shown.
The old config was like this:
+afk: '{PLAYER} is now AFK'
-afk: '{PLAYER} is no longer AFK'
but changing {PLAYER} to {DISPLAYNAME} didn't fix it =/
edit: nevermind. After deleting the config and restarting the server everything's back to normal xD
I seem to be having a problem. I cannot change the colors of the message or player names. I can change it fine but it does not affect the game for some reason
Nice! It works great!
if possible could you add displayname into # Messages: def. true (keys: {PLAYER}, {TIME}) as i do use niknames and it is kinda silly not to use those as well in such a great plugin :D
Hi, i'm sorry for long pause. New version was uploaded, so please report any bugs, thank you!
Can do this only op's?
I'll second ThisUsernameIsMine idea.
When players look in the tab, they still can see the differents between groups,normal players and moderators/admins for example.
This could be very useful special in bigger servers
greets dutchy
11:34:56 PM [WARNING] [AFK] Task #2821 for AFK v2.0.2 generated an exception java.lang.IllegalArgumentException: Player list names can only be a maximum of 16 characters long at org.bukkit.craftbukkit.v1_4_R1.entity.CraftPlayer.setPlayerListName(CraftPlayer.java:168) at com.github.alesvojta.AFK.AFK.becomeAFK(AFK.java:47) at com.github.alesvojta.AFK.AFKIdleTimer.run(AFKIdleTimer.java:22) at org.bukkit.craftbukkit.v1_4_R1.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_4_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:344) at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:530) at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224) at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494) at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)