diff --git a/paper-api/src/main/java/org/bukkit/persistence/PersistentDataContainer.java b/paper-api/src/main/java/org/bukkit/persistence/PersistentDataContainer.java index 05a93aa314..bf2a957be5 100644 --- a/paper-api/src/main/java/org/bukkit/persistence/PersistentDataContainer.java +++ b/paper-api/src/main/java/org/bukkit/persistence/PersistentDataContainer.java @@ -1,5 +1,6 @@ package org.bukkit.persistence; +import java.util.Set; import org.bukkit.NamespacedKey; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -114,6 +115,18 @@ public interface PersistentDataContainer { @NotNull Z getOrDefault(@NotNull NamespacedKey key, @NotNull PersistentDataType type, @NotNull Z defaultValue); + /** + * Get a set of keys present on this {@link PersistentDataContainer} + * instance. + * + * Any changes made to the returned set will not be reflected on the + * instance. + * + * @return the key set + */ + @NotNull + Set getKeys(); + /** * Removes a custom key from the {@link PersistentDataHolder} instance. *