Closed Espressocodes closed 3 weeks ago
Do you know of any plugins that implement a similar system? and/or link documentation from the plugins for how this should be done?
Do you know of any plugins that implement a similar system? and/or link documentation from the plugins for how this should be done?
Yes, of course. Essentials and CMI do it.
So so sorry for the delay! Here's the Discord SRV documentation on hooking into a permission/Event Here's the Bukkit Jdoc for event hooks
Specifically here's the CMI AFK Alert hook: CMIAfkEnterEvent.java
# Send an AFK alert when someone is AFK
- Trigger: CMIAfkEnterEvent
Channel: afk
Embed:
Color: "#869600"
Author:
ImageUrl: "https://crafthead.net/helm/${player.getUniqueId()}"
Name: '${player.displayName + " is now AFK"}'
And essentials: AfkStatusChangeEvent.java
# Send an AFK alert when someone is AFK / is no longer AFK
- Trigger: AfkStatusChangeEvent
Channel: afk
Embed:
Color: "#869600"
Author:
ImageUrl: "https://crafthead.net/helm/${#event.getAffected().getUUID()}"
Name: '${#event.getAffected().getName() + " is " + (#event.value ? "now" : "no longer") + " AFK"}'
I did try and use a permission for TT to get this to work, but it didn't seem to hook in properly.
Saw your commit. I felt a disturbance in the force. Thank you for this. I can't wait to see what you do with the plugin moving forward.
Will be added in the next update, see the wiki (https://github.com/teakivy/teaks-tweaks/wiki/Pack:-AFK-Display#events) for more information.
Hello!
I use DiscordSRV on my server and I would like to build alerts for the TweaksTweaks packages, but I need some information. For Essentials and CMI they have a event call that I can hook into in order to send a notice whenever the AFK status is added or removed. An example below with what I was attempting to use:
The following is from the Discord SRV documentation of a pre-built event of this type:
So, I'm not quite sure what event I'm looking for here. I'd also like to know if there's an event list of some sort that the pack uses so that I can build a few generic notifications, but I'm quite stuck! Any help is appreciated here to get the correct call.