Package de.kiridevs.kiricore.managers
Class AfkManager
java.lang.Object
de.kiridevs.kiricore.managers.AfkManager
public class AfkManager
extends java.lang.Object
A class with only static methods used to manage the AFK status of players using kiriCore's AFK system
-
Constructor Summary
Constructors Constructor Description AfkManager() -
Method Summary
Modifier and Type Method Description static java.util.ArrayList<java.lang.String>getAfkList()Getter for the full AFK liststatic booleanisAfk(java.lang.String playername)Allows quick checking of the status of a player using the player's namestatic booleanisAfk(org.bukkit.entity.Player player)Allows quick checking of the status of a player using the player's Player objectstatic booleanmarkAfk(org.bukkit.entity.Player player)static booleanmarkBack(org.bukkit.entity.Player player)static booleantoggleAfk(org.bukkit.entity.Player player)
-
Constructor Details
-
AfkManager
public AfkManager()
-
-
Method Details
-
isAfk
public static boolean isAfk(java.lang.String playername)Allows quick checking of the status of a player using the player's name- Parameters:
playername- The name (not display name) of the player to check the status of- Returns:
- true when the player IS marked as AFK right now false when the player is NOT marked as AFK right now
-
isAfk
public static boolean isAfk(org.bukkit.entity.Player player)Allows quick checking of the status of a player using the player's Player object- Parameters:
player- The Player element of the player to check the status of- Returns:
- true when the player IS marked as AFK right now false when the player is NOT marked as AFK right now
-
markAfk
public static boolean markAfk(org.bukkit.entity.Player player) -
markBack
public static boolean markBack(org.bukkit.entity.Player player) -
toggleAfk
public static boolean toggleAfk(org.bukkit.entity.Player player) -
getAfkList
public static java.util.ArrayList<java.lang.String> getAfkList()Getter for the full AFK list- Returns:
- The current afkList including player names (not display names) of all players marked AFK at the moment
-