public class DatabaseActiveBanStorage extends Object implements ActiveBanStorage
Constructor and Description |
---|
DatabaseActiveBanStorage() |
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.
|
public @Nullable Ban load(UUID playerId)
ActiveBanStorage
load
in interface ActiveBanStorage
playerId
- the UUID of a player.null
if the player is not bannedpublic void save(Ban ban)
ActiveBanStorage
save
in interface ActiveBanStorage
ban
- the active ban to save.public void remove(UUID playerId)
ActiveBanStorage
remove
in interface ActiveBanStorage
playerId
- the UUID of the playerpublic List<Ban> loadBanOnIP(String ip)
ActiveBanStorage
loadBanOnIP
in interface ActiveBanStorage
ip
- which we are looking for banspublic List<Ban> getAll()
ActiveBanStorage
getAll
in interface ActiveBanStorage