Interface CustomDataManager
public interface CustomDataManager
An interface to load/save custom data using
MapNode.-
Method Summary
Modifier and TypeMethodDescription@NotNull MapNodeloadData(@NotNull net.kyori.adventure.key.Key key) Loads theMapNode.voidSaves theMapNode.voidvisitData(@NotNull String namespace, @NotNull BiConsumer<net.kyori.adventure.key.Key, MapNode> consumer) Visits allMapNodes that are keyed with the specified namespace.
-
Method Details
-
loadData
-
saveData
-
visitData
void visitData(@NotNull @NotNull String namespace, @NotNull @NotNull BiConsumer<net.kyori.adventure.key.Key, MapNode> consumer) throws Exception Visits allMapNodes that are keyed with the specified namespace.- Parameters:
namespace- the namespace to getMapNodeconsumer- theBiConsumerto consume loadedMapNodewith itsKey- Throws:
Exception- if a storage error occurredIllegalArgumentException- if the specified namespace is invalid (it is checked byKey.checkNamespace(String))
-