public interface ActiveBanStorage
Implementations must not retain any state since they can be replaced at any time, caching is fine as long as it does not require saving cached values implicitly.
Modifier and Type | Method and Description |
---|---|
List<Ban> |
getAll()
Get all active bans
|
@Nullable Ban |
load(UUID playerId)
Loads the active ban of the player identified by the given UUID.
|
List<Ban> |
loadBanOnIP(String ip)
Get all active ban on given IP
|
void |
remove(UUID playerId)
Removes the ban associated to the player identified by the given UUID.
|
void |
save(Ban ban)
Saves the given active ban.
|
@Nullable Ban load(UUID playerId)
playerId
- the UUID of a player.null
if the player is not bannedvoid save(Ban ban)
ban
- the active ban to save.void remove(UUID playerId)
playerId
- the UUID of the playerList<Ban> loadBanOnIP(String ip)
ip
- which we are looking for bans