diff options
author | Lexi <[email protected]> | 2021-12-12 23:26:19 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2021-12-12 20:26:19 -0800 |
commit | df1301b53a0a007a6817f34228e98aeecae3a353 (patch) | |
tree | 020e77b63d68b4b02b999626358fd99d717e9598 | |
parent | c1bd3cc8fd3b8b4aa6f691728eef593cfac3b077 (diff) | |
download | Paper-df1301b53a0a007a6817f34228e98aeecae3a353.tar.gz Paper-df1301b53a0a007a6817f34228e98aeecae3a353.zip |
Make org.bukkit.Keyed extend Adventure's Keyed (#7090)
-rw-r--r-- | patches/api/0008-Adventure.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/api/0008-Adventure.patch b/patches/api/0008-Adventure.patch index 3d79cfed1e..b6599a84a2 100644 --- a/patches/api/0008-Adventure.patch +++ b/patches/api/0008-Adventure.patch @@ -682,6 +682,36 @@ index cc42bfa74b41ef6d6374efa7b882f71677fb0824..ef06bd2972e0a4e7ffa0e91d2b0de5d7 public static String getShutdownMessage() { return server.getShutdownMessage(); } +diff --git a/src/main/java/org/bukkit/Keyed.java b/src/main/java/org/bukkit/Keyed.java +index 32c92621c2c15eec14c50965f5ecda00c46e6c80..e076d447da62445764a9776ee2554c077637d270 100644 +--- a/src/main/java/org/bukkit/Keyed.java ++++ b/src/main/java/org/bukkit/Keyed.java +@@ -5,7 +5,7 @@ import org.jetbrains.annotations.NotNull; + /** + * Represents an object which has a {@link NamespacedKey} attached to it. + */ +-public interface Keyed { ++public interface Keyed extends net.kyori.adventure.key.Keyed { // Paper -- extend Adventure Keyed + + /** + * Return the namespaced identifier for this object. +@@ -14,4 +14,16 @@ public interface Keyed { + */ + @NotNull + NamespacedKey getKey(); ++ ++ // Paper start ++ /** ++ * Returns the unique identifier for this object. ++ * ++ * @return this object's key ++ */ ++ @Override ++ default net.kyori.adventure.key.@NotNull Key key() { ++ return this.getKey(); ++ } ++ // Paper end + } diff --git a/src/main/java/org/bukkit/Nameable.java b/src/main/java/org/bukkit/Nameable.java index fee814e01a653d2b53c56e8b566383ca44aa5346..2acdf2a6d3955923c721222b9da784f3278f6418 100644 --- a/src/main/java/org/bukkit/Nameable.java |