Open DwarfyAssassin opened 5 years ago
In short disable pvp for AFK players. This could be useful because on some server killing players who are AFK is forbidden, this would enforce that rule.
From what I have seen and tested this should work to get if a player is AFK.
Essentials ess = (Essentials) Bukkit.getServer().getPluginManager().getPlugin("Essentials"); ess.getUser(BukkitPlayer).isAfk()
We'll also add an event for canDoPvP, which allows compatbility modules to change the behaviour of that function. See #338
canDoPvP
In short disable pvp for AFK players. This could be useful because on some server killing players who are AFK is forbidden, this would enforce that rule.
From what I have seen and tested this should work to get if a player is AFK.