Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by Username1234, Jun 4, 2017.
How would I check if a player is AFK with the EssentialsX API?
Get the user from the API than use isAFK(); which returns a boolean.
From the Spigot API or EssentialsX API？
Does Spigot have AFK features? No, it does not. So you have to get it from the Essentials API.
How do I get the player? I am new to the Essentials API. The GitHub page does not help.
get the plugin itself. Bukkit#getPluginManager
IEssentials ess = (IEssentials) Bukkit.getPluginManager().getPlugin("Essentials");
Interesting, that's what I tried doing before but it did not work. I'll try again.
then you didnt do it right. show how you attempted it
I tried doing:
Essentials ess = (Essentials) Bukkit.getPluginManager().getPlugin("EssentialsX");
Maybe it is because I need to change Essentials to IEssentials? Because when I did it that way, nothing would show up if I try to do ess.whatever.
Also, which import should I use?
Never mind, solved! Thanks to everyone that has contributed.