diff --git a/api/src/main/java/net/countercraft/movecraft/craft/datatag/CraftDataTagRegistry.java b/api/src/main/java/net/countercraft/movecraft/craft/datatag/CraftDataTagRegistry.java index ea6388662..d542f8405 100644 --- a/api/src/main/java/net/countercraft/movecraft/craft/datatag/CraftDataTagRegistry.java +++ b/api/src/main/java/net/countercraft/movecraft/craft/datatag/CraftDataTagRegistry.java @@ -4,6 +4,8 @@ import org.bukkit.NamespacedKey; import org.jetbrains.annotations.NotNull; +import java.util.Enumeration; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.function.Function; @@ -41,4 +43,12 @@ public CraftDataTagRegistry(){ public boolean isRegistered(final @NotNull NamespacedKey key){ return _registeredTags.containsKey(key); } + + /** + * Get an iterable over all keys currently registered. + * @return An immutable iterable over the registry keys + */ + public @NotNull Iterable<@NotNull NamespacedKey> getAllKeys(){ + return _registeredTags.keySet().stream().toList(); + } }