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)
ActiveBanStorageload in interface ActiveBanStorageplayerId - the UUID of a player.null if the player is not bannedpublic void save(Ban ban)
ActiveBanStoragesave in interface ActiveBanStorageban - the active ban to save.public void remove(UUID playerId)
ActiveBanStorageremove in interface ActiveBanStorageplayerId - the UUID of the playerpublic List<Ban> loadBanOnIP(String ip)
ActiveBanStorageloadBanOnIP in interface ActiveBanStorageip - which we are looking for banspublic List<Ban> getAll()
ActiveBanStoragegetAll in interface ActiveBanStorage