public class UserList<K,V extends UserListEntry<K>>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
UserList.Serializer |
Modifier and Type | Field and Description |
---|---|
protected com.google.gson.Gson |
gson |
private boolean |
lanServer |
protected static org.apache.logging.log4j.Logger |
logger |
private java.io.File |
saveFile |
private static java.lang.reflect.ParameterizedType |
saveFileFormat |
private java.util.Map<java.lang.String,V> |
values |
Constructor and Description |
---|
UserList(java.io.File saveFile) |
Modifier and Type | Method and Description |
---|---|
void |
addEntry(V entry)
Adds an entry to the list
|
protected UserListEntry<K> |
createEntry(com.google.gson.JsonObject entryData) |
V |
getEntry(K obj) |
java.lang.String[] |
getKeys() |
protected java.lang.String |
getObjectKey(K obj)
Gets the key value for the given object
|
protected java.util.Map<java.lang.String,V> |
getValues() |
protected boolean |
hasEntry(K entry) |
boolean |
isLanServer() |
void |
removeEntry(K p_152684_1_) |
private void |
removeExpired()
Removes expired bans from the list.
|
void |
setLanServer(boolean state) |
void |
writeChanges() |
protected static final org.apache.logging.log4j.Logger logger
protected final com.google.gson.Gson gson
private final java.io.File saveFile
private final java.util.Map<java.lang.String,V extends UserListEntry<K>> values
private boolean lanServer
private static final java.lang.reflect.ParameterizedType saveFileFormat
public boolean isLanServer()
public void setLanServer(boolean state)
public void addEntry(V entry)
public void removeEntry(K p_152684_1_)
public java.lang.String[] getKeys()
protected java.lang.String getObjectKey(K obj)
protected boolean hasEntry(K entry)
private void removeExpired()
BanEntry.hasBanExpired()
protected UserListEntry<K> createEntry(com.google.gson.JsonObject entryData)
protected java.util.Map<java.lang.String,V> getValues()
public void writeChanges() throws java.io.IOException
java.io.IOException