geforkt von Mirrors/Paper
Make org.bukkit.Keyed extend Adventure's Keyed (#7090)
Dieser Commit ist enthalten in:
Ursprung
0d72808107
Commit
e18cad9a03
@ -682,6 +682,36 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public static String getShutdownMessage() {
|
public static String getShutdownMessage() {
|
||||||
return server.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
|
diff --git a/src/main/java/org/bukkit/Nameable.java b/src/main/java/org/bukkit/Nameable.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/Nameable.java
|
--- a/src/main/java/org/bukkit/Nameable.java
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren