Added PersistentDataKey#values

This commit is contained in:
Auxilor
2021-11-04 19:16:38 +00:00
parent ab5f8cee5a
commit 857d51a7a1

View File

@@ -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<T> {
+ ", type=" + type
+ '}';
}
/**
* Get all persistent data keys.
*
* @return The keys.
*/
public static Set<PersistentDataKey<?>> values() {
return Eco.getHandler().getKeyRegistry().getRegisteredKeys();
}
}