File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -682,6 +682,36 @@ index cc42bfa74b41ef6d6374efa7b882f71677fb0824..ef06bd2972e0a4e7ffa0e91d2b0de5d7
682682 public static String getShutdownMessage() {
683683 return server.getShutdownMessage();
684684 }
685+ diff --git a/src/main/java/org/bukkit/Keyed.java b/src/main/java/org/bukkit/Keyed.java
686+ index 32c92621c2c15eec14c50965f5ecda00c46e6c80..e076d447da62445764a9776ee2554c077637d270 100644
687+ --- a/src/main/java/org/bukkit/Keyed.java
688+ +++ b/src/main/java/org/bukkit/Keyed.java
689+ @@ -5,7 +5,7 @@ import org.jetbrains.annotations.NotNull;
690+ /**
691+ * Represents an object which has a {@link NamespacedKey} attached to it.
692+ */
693+ - public interface Keyed {
694+ + public interface Keyed extends net.kyori.adventure.key.Keyed { // Paper -- extend Adventure Keyed
695+
696+ /**
697+ * Return the namespaced identifier for this object.
698+ @@ -14,4 +14,16 @@ public interface Keyed {
699+ */
700+ @NotNull
701+ NamespacedKey getKey();
702+ +
703+ + // Paper start
704+ + /**
705+ + * Returns the unique identifier for this object.
706+ + *
707+ + * @return this object's key
708+ + */
709+ + @Override
710+ + default net.kyori.adventure.key.@NotNull Key key() {
711+ + return this.getKey();
712+ + }
713+ + // Paper end
714+ }
685715diff --git a/src/main/java/org/bukkit/Nameable.java b/src/main/java/org/bukkit/Nameable.java
686716index fee814e01a653d2b53c56e8b566383ca44aa5346..2acdf2a6d3955923c721222b9da784f3278f6418 100644
687717--- a/src/main/java/org/bukkit/Nameable.java
You can’t perform that action at this time.
0 commit comments