Package net.citizensnpcs.api.persistence
Class NamespacedKeyPersister
java.lang.Object
net.citizensnpcs.api.persistence.NamespacedKeyPersister
- All Implemented Interfaces:
Persister<NamespacedKey>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates an object instance from the givenDataKey
.void
save
(NamespacedKey instance, DataKey root) Saves the object instance to the givenDataKey
.
-
Constructor Details
-
NamespacedKeyPersister
public NamespacedKeyPersister()
-
-
Method Details
-
create
Description copied from interface:Persister
Creates an object instance from the givenDataKey
. Should not return null unless no data is present.- Specified by:
create
in interfacePersister<NamespacedKey>
- Parameters:
root
- The root key to load from- Returns:
- The created instance, or null if no data was present
-
save
Description copied from interface:Persister
Saves the object instance to the givenDataKey
.- Specified by:
save
in interfacePersister<NamespacedKey>
- Parameters:
instance
- The object instance to saveroot
- The key to save into
-