geforkt von Mirrors/Paper
31 Zeilen
1.2 KiB
Diff
31 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: u9g <winworkswow@gmail.com>
|
|
Date: Mon, 3 Jan 2022 23:27:21 -0500
|
|
Subject: [PATCH] Add new overload to PersistentDataContainer#has
|
|
|
|
Adds the new overload: PersistentDataContainer#has(NamespacedKey key)
|
|
|
|
diff --git a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
|
+++ b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java
|
|
@@ -0,0 +0,0 @@ public interface PersistentDataContainer {
|
|
*/
|
|
@NotNull
|
|
PersistentDataAdapterContext getAdapterContext();
|
|
+
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Returns if the persistent metadata provider has metadata registered
|
|
+ * matching the provided key.
|
|
+ *
|
|
+ * @param key the key for which existence should be checked.
|
|
+ *
|
|
+ * @return whether the key exists
|
|
+ *
|
|
+ * @throws NullPointerException if the key to look up is null
|
|
+ */
|
|
+ boolean has(@NotNull NamespacedKey key);
|
|
+ // Paper end
|
|
}
|