Class AbstractConfigurateStorage
java.lang.Object
me.lucko.luckperms.common.storage.implementation.file.AbstractConfigurateStorage
- All Implemented Interfaces:
StorageImplementation
- Direct Known Subclasses:
CombinedConfigurateStorage, SeparatedConfigurateStorage
Abstract storage implementation using Configurate
ConfigurationNodes to
serialize and deserialize data.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Pathprotected final ConfigurateLoaderThe Configurate loader used to read/write dataprotected final LuckPermsPluginThe plugin instance -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractConfigurateStorage(LuckPermsPlugin plugin, String implementationName, ConfigurateLoader loader, String dataDirectoryName) -
Method Summary
Modifier and TypeMethodDescriptioncreateAndLoadGroup(String name) createAndLoadTrack(String name) voiddeleteGroup(Group group) voiddeletePlayerData(UUID uniqueId) voiddeleteTrack(Track track) getLogPage(FilterList<net.luckperms.api.actionlog.Action> filters, @Nullable PageParameters page) getMeta()getPlayerName(UUID uniqueId) getPlayerUniqueId(String username) voidinit()voidlogAction(net.luckperms.api.actionlog.Action entry) protected booleanprocessBulkUpdate(BulkUpdate bulkUpdate, ninja.leaping.configurate.ConfigurationNode node, HolderType holderType) protected abstract ninja.leaping.configurate.ConfigurationNodereadFile(StorageLocation location, String name) Reads a configuration node from the given locationprotected static Set<net.luckperms.api.node.Node> readNodes(ninja.leaping.configurate.ConfigurationNode data) protected abstract voidsaveFile(StorageLocation location, String name, ninja.leaping.configurate.ConfigurationNode node) Saves a configuration node to the given locationvoidnet.luckperms.api.model.PlayerSaveResultsavePlayerData(UUID uniqueId, String username) voidvoidvoidshutdown()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StorageImplementation
applyBulkUpdate, getUniqueUsers, loadAllGroups, loadAllTracks, searchGroupNodes, searchUserNodes
-
Field Details
-
plugin
The plugin instance -
loader
The Configurate loader used to read/write data -
dataDirectory
-
-
Constructor Details
-
AbstractConfigurateStorage
protected AbstractConfigurateStorage(LuckPermsPlugin plugin, String implementationName, ConfigurateLoader loader, String dataDirectoryName)
-
-
Method Details
-
getPlugin
- Specified by:
getPluginin interfaceStorageImplementation
-
getImplementationName
- Specified by:
getImplementationNamein interfaceStorageImplementation
-
getMeta
- Specified by:
getMetain interfaceStorageImplementation
-
readFile
protected abstract ninja.leaping.configurate.ConfigurationNode readFile(StorageLocation location, String name) throws IOException Reads a configuration node from the given location- Parameters:
location- the locationname- the name of the object- Returns:
- the node
- Throws:
IOException- if an io error occurs
-
saveFile
protected abstract void saveFile(StorageLocation location, String name, ninja.leaping.configurate.ConfigurationNode node) throws IOException Saves a configuration node to the given location- Parameters:
location- the locationname- the name of the objectnode- the node- Throws:
IOException- if an io error occurs
-
init
- Specified by:
initin interfaceStorageImplementation- Throws:
IOException
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceStorageImplementation
-
logAction
public void logAction(net.luckperms.api.actionlog.Action entry) - Specified by:
logActionin interfaceStorageImplementation
-
getLogPage
public LogPage getLogPage(FilterList<net.luckperms.api.actionlog.Action> filters, @Nullable PageParameters page) throws Exception - Specified by:
getLogPagein interfaceStorageImplementation- Throws:
Exception
-
loadUser
- Specified by:
loadUserin interfaceStorageImplementation- Throws:
IOException
-
loadUsers
-
saveUser
- Specified by:
saveUserin interfaceStorageImplementation- Throws:
IOException
-
createAndLoadGroup
- Specified by:
createAndLoadGroupin interfaceStorageImplementation- Throws:
IOException
-
loadGroup
- Specified by:
loadGroupin interfaceStorageImplementation- Throws:
IOException
-
saveGroup
- Specified by:
saveGroupin interfaceStorageImplementation- Throws:
IOException
-
deleteGroup
- Specified by:
deleteGroupin interfaceStorageImplementation- Throws:
IOException
-
createAndLoadTrack
- Specified by:
createAndLoadTrackin interfaceStorageImplementation- Throws:
IOException
-
loadTrack
- Specified by:
loadTrackin interfaceStorageImplementation- Throws:
IOException
-
saveTrack
- Specified by:
saveTrackin interfaceStorageImplementation- Throws:
IOException
-
deleteTrack
- Specified by:
deleteTrackin interfaceStorageImplementation- Throws:
IOException
-
savePlayerData
- Specified by:
savePlayerDatain interfaceStorageImplementation
-
deletePlayerData
- Specified by:
deletePlayerDatain interfaceStorageImplementation
-
getPlayerUniqueId
- Specified by:
getPlayerUniqueIdin interfaceStorageImplementation
-
getPlayerName
- Specified by:
getPlayerNamein interfaceStorageImplementation
-
processBulkUpdate
protected boolean processBulkUpdate(BulkUpdate bulkUpdate, ninja.leaping.configurate.ConfigurationNode node, HolderType holderType) -
readNodes
protected static Set<net.luckperms.api.node.Node> readNodes(ninja.leaping.configurate.ConfigurationNode data)
-