Package net.kyori.adventure.key
Interface Key
- All Superinterfaces:
- Comparable<Key>,- net.kyori.examination.Examinable
public interface Key extends Comparable<Key>, net.kyori.examination.Examinable
A key.
- Since:
- 4.0.0
- 
Field SummaryFields Modifier and Type Field Description static StringMINECRAFT_NAMESPACEThe namespace for Minecraft.
- 
Method SummaryModifier and Type Method Description @NonNull StringasString()Returns the string representation of this key.default intcompareTo(@NonNull Key that)default @NonNull Stream<? extends net.kyori.examination.ExaminableProperty>examinableProperties()static @NonNull Keykey(@NonNull String string)Creates a key.static @NonNull Keykey(@NonNull String string, char character)Creates a key.static @NonNull Keykey(@NonNull String namespace, @NonNull String value)Creates a key.@NonNull Stringnamespace()Gets the namespace.@NonNull Stringvalue()Gets the value.
- 
Field Details- 
MINECRAFT_NAMESPACEThe namespace for Minecraft.- Since:
- 4.0.0
- See Also:
- Constant Field Values
 
 
- 
- 
Method Details- 
keyCreates a key.- Parameters:
- string- the string
- Returns:
- the key
- Throws:
- InvalidKeyException- if the namespace or value contains an invalid character
- Since:
- 4.0.0
 
- 
keyCreates a key.- Parameters:
- string- the string
- character- the character
- Returns:
- the key
- Throws:
- InvalidKeyException- if the namespace or value contains an invalid character
- Since:
- 4.0.0
 
- 
keyCreates a key.- Parameters:
- namespace- the namespace
- value- the value
- Returns:
- the key
- Throws:
- InvalidKeyException- if the namespace or value contains an invalid character
- Since:
- 4.0.0
 
- 
namespace@NonNull String namespace()Gets the namespace.- Returns:
- the namespace
- Since:
- 4.0.0
 
- 
value@NonNull String value()Gets the value.- Returns:
- the value
- Since:
- 4.0.0
 
- 
asString@NonNull String asString()Returns the string representation of this key.- Returns:
- the string representation
- Since:
- 4.0.0
 
- 
examinableProperties- Specified by:
- examinablePropertiesin interface- net.kyori.examination.Examinable
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<Key>
 
 
-