Interface PunishmentsApi
public interface PunishmentsApi
Reads and creates Plex punishments.
-
Method Summary
Modifier and TypeMethodDescriptionFinds an indefinite ban by IP address.indefiniteBanByName(String name) Finds an indefinite ban by player name.indefiniteBanByUuid(UUID uuid) Looks up an indefinite ban by UUID.Returns current indefinite bans.Checks if a player has an active ban.Checks whether a player has an active UUID or current IP ban.punish(PunishmentRequest punishment) Applies a punishment to a player.Removes active bans for a player.
-
Method Details
-
indefiniteBans
List<IndefiniteBanView> indefiniteBans()Returns current indefinite bans.- Returns:
- current indefinite bans
-
indefiniteBanByUuid
Looks up an indefinite ban by UUID.- Parameters:
uuid- UUID to look up- Returns:
- matching indefinite ban, if one exists
-
indefiniteBanByName
Finds an indefinite ban by player name.- Parameters:
name- player name- Returns:
- matching ban, if one exists
-
indefiniteBanByIp
Finds an indefinite ban by IP address.- Parameters:
ip- IP address- Returns:
- matching ban, if one exists
-
isBanned
Checks if a player has an active ban.- Parameters:
uuid- player UUID- Returns:
- result of the check
-
isBanned
Checks whether a player has an active UUID or current IP ban.- Parameters:
uuid- player UUIDip- current player IP, ornullto check only the UUID- Returns:
- result of the check
-
unban
Removes active bans for a player.- Parameters:
uuid- player UUID- Returns:
- future containing whether an active ban was removed
-
punish
Applies a punishment to a player.- Parameters:
punishment- punishment details- Returns:
- result that completes when storage is updated
- Throws:
NullPointerException- if the request is null
-