Package com.tomkeuper.bedwars.api
Interface BedWars.AFKUtil
- Enclosing interface:
BedWars
public static interface BedWars.AFKUtil
Utility interface for managing AFK (Away From Keyboard) status of players in the bed wars mini-game.
-
Method Summary
Modifier and TypeMethodDescriptionint
getPlayerTimeAFK
(org.bukkit.entity.Player player) Gets the amount of time in seconds that a player has been AFK (Away From Keyboard).boolean
isPlayerAFK
(org.bukkit.entity.Player player) Checks if a player is marked as AFK (Away From Keyboard).void
setPlayerAFK
(org.bukkit.entity.Player player, boolean value) Sets the AFK (Away From Keyboard) status of a player.
-
Method Details
-
isPlayerAFK
boolean isPlayerAFK(org.bukkit.entity.Player player) Checks if a player is marked as AFK (Away From Keyboard).- Parameters:
player
- the player to check- Returns:
- true if the player is AFK, false otherwise
-
setPlayerAFK
void setPlayerAFK(org.bukkit.entity.Player player, boolean value) Sets the AFK (Away From Keyboard) status of a player.- Parameters:
player
- the player to set AFK status forvalue
- true to mark the player as AFK, false to mark them as not AFK
-
getPlayerTimeAFK
int getPlayerTimeAFK(org.bukkit.entity.Player player) Gets the amount of time in seconds that a player has been AFK (Away From Keyboard).- Parameters:
player
- the player to get AFK time for- Returns:
- the number of seconds since the player became AFK, or 0 if they are not AFK
-