mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 11:15:57 -07:00
#500: Add PersistentDataContainer#getKeys()
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
@@ -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.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user