mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
Make org.bukkit.Keyed extend Adventure's Keyed (#7090)
This commit is contained in:
parent
0d72808107
commit
e18cad9a03
1 changed files with 30 additions and 0 deletions
|
@ -682,6 +682,36 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Keyed.java
|
||||
+++ b/src/main/java/org/bukkit/Keyed.java
|
||||
@@ -0,0 +0,0 @@ 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.
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Nameable.java
|
||||
|
|
Loading…
Reference in a new issue