mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 07:34:48 +01:00
#500: Add PersistentDataContainer#getKeys()
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
94dded04b6
commit
46b14c30d7
1 changed files with 13 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
package org.bukkit.persistence;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -114,6 +115,18 @@ public interface PersistentDataContainer {
|
|||
@NotNull
|
||||
<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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue