1
0
mirror of https://github.com/PaperMC/Paper.git synced 2025-03-02 11:22:01 +01:00

: Add PersistentDataContainer#getKeys()

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
Bukkit/Spigot 2020-06-26 10:49:24 +10:00
parent 94dded04b6
commit 46b14c30d7

View File

@ -1,5 +1,6 @@
package org.bukkit.persistence; package org.bukkit.persistence;
import java.util.Set;
import org.bukkit.NamespacedKey; import org.bukkit.NamespacedKey;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@ -114,6 +115,18 @@ public interface PersistentDataContainer {
@NotNull @NotNull
<T, Z> Z getOrDefault(@NotNull NamespacedKey key, @NotNull PersistentDataType<T, Z> type, @NotNull Z defaultValue); <T, Z> Z getOrDefault(@NotNull NamespacedKey key, @NotNull PersistentDataType<T, Z> 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<NamespacedKey> getKeys();
/** /**
* Removes a custom key from the {@link PersistentDataHolder} instance. * Removes a custom key from the {@link PersistentDataHolder} instance.
* *