From 857d51a7a109973666e39502e205e85f99d55bf7 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 4 Nov 2021 19:16:38 +0000 Subject: [PATCH] Added PersistentDataKey#values --- .../willfp/eco/core/data/keys/PersistentDataKey.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java b/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java index dc595122..2a5cea9d 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java +++ b/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java @@ -5,6 +5,8 @@ import lombok.Getter; import org.bukkit.NamespacedKey; import org.jetbrains.annotations.NotNull; +import java.util.Set; + /** * A persistent data key is a key with a type that can be stored about an offline player. * @@ -54,4 +56,13 @@ public class PersistentDataKey { + ", type=" + type + '}'; } + + /** + * Get all persistent data keys. + * + * @return The keys. + */ + public static Set> values() { + return Eco.getHandler().getKeyRegistry().getRegisteredKeys(); + } }