Package net.glowstone.util.bans
Class UuidListFile
java.lang.Object
net.glowstone.util.bans.JsonListFile
net.glowstone.util.bans.UuidListFile
Common management for whitelist and ops list files.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.glowstone.util.bans.JsonListFile
JsonListFile.BaseEntry -
Field Summary
Fields inherited from class net.glowstone.util.bans.JsonListFile
entries -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(org.bukkit.OfflinePlayer player) If the given player is not already on this list, adds that player and saves the change to disk.booleancontainsProfile(GlowPlayerProfile profile) Checks whether the player with a given UUID is in this list.booleancontainsUuid(UUID uuid) Searches for a UUID.Returns aGlowPlayerProfilefor each player whose UUID is in the list file.voidload()Reloads from the file.protected JsonListFile.BaseEntryDeserialize an entry from JSON format.voidremove(GlowPlayerProfile profile) If the given player is on this list, removes that player and saves the change to disk.Methods inherited from class net.glowstone.util.bans.JsonListFile
save
-
Constructor Details
-
UuidListFile
-
-
Method Details
-
load
public void load()Description copied from class:JsonListFileReloads from the file.- Overrides:
loadin classJsonListFile
-
getProfiles
Returns aGlowPlayerProfilefor each player whose UUID is in the list file.- Returns:
- a list of
GlowPlayerProfileinstances
-
containsUuid
Searches for a UUID.- Parameters:
uuid- the UUID to search for- Returns:
- true if the UUID is present; false otherwise
-
containsProfile
Checks whether the player with a given UUID is in this list.- Parameters:
profile- the player whose UUID will be looked up- Returns:
- whether the player is on this list
-
add
public void add(org.bukkit.OfflinePlayer player) If the given player is not already on this list, adds that player and saves the change to disk.- Parameters:
player- the player to add
-
remove
If the given player is on this list, removes that player and saves the change to disk.- Parameters:
profile- the player to remove
-
readEntry
Description copied from class:JsonListFileDeserialize an entry from JSON format.- Specified by:
readEntryin classJsonListFile- Parameters:
map- The JSON object to read from.- Returns:
- The finished Entry.
-