Files
Paper/paper-api/src/main/java/org/bukkit/Keyed.java
Riley Park 15081a5912 Adventure
Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
2021-01-29 17:21:55 +01:00

30 lines
655 B
Java

package org.bukkit;
import org.jetbrains.annotations.NotNull;
/**
* Represents an object which has a {@link NamespacedKey} attached to it.
*/
public interface Keyed extends net.kyori.adventure.key.Keyed { // Paper -- extend Adventure Keyed
/**
* Return the namespaced identifier for this object.
*
* @return this object's key
*/
@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
}