Solved EssentialsX API- Checking If a Player is AFK

Discussion in 'Spigot Plugin Development' started by Username1234, Jun 4, 2017.

Thread Status:
Not open for further replies.
  1. How would I check if a player is AFK with the EssentialsX API?
  2. Get the user from the API than use isAFK(); which returns a boolean.
    • Like Like x 2
  3. From the Spigot API or EssentialsX API?
    • Funny Funny x 1
  4. Essential's API.
    • Like Like x 1
  5. Does Spigot have AFK features? No, it does not. So you have to get it from the Essentials API.
    • Like Like x 1
    • Funny Funny x 1
    • Informative Informative x 1
    • Friendly Friendly x 1
  6. How do I get the player? I am new to the Essentials API. The GitHub page does not help.
  7. get the plugin itself. Bukkit#getPluginManager

    Code (Java):
  8. Code (Text):
    IEssentials ess = (IEssentials) Bukkit.getPluginManager().getPlugin("Essentials");
  9. Interesting, that's what I tried doing before but it did not work. I'll try again.
  10. then you didnt do it right. show how you attempted it
  11. I tried doing:
    Code (Text):
    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?
  12. Never mind, solved! Thanks to everyone that has contributed.
Thread Status:
Not open for further replies.