public class FileActiveBanStorage extends Object implements ActiveBanStorage
| Constructor and Description | 
|---|
FileActiveBanStorage(Path banDir)  | 
| 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 FileActiveBanStorage(Path banDir)
public @Nullable Ban load(UUID playerId)
ActiveBanStorageload in interface ActiveBanStorageplayerId - the UUID of a player.null if the player is not bannedpublic List<Ban> loadBanOnIP(String ip)
ActiveBanStorageloadBanOnIP in interface ActiveBanStorageip - which we are looking for banspublic 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> getAll()
ActiveBanStoragegetAll in interface ActiveBanStorage