public final class NamespacedKey extends Object
Keys may only contain lowercase alphanumeric characters, periods, underscores, hyphens, and forward slashes.
| Modifier and Type | Field | Description | 
|---|---|---|
static String | 
BUKKIT | 
 The namespace representing all keys generated by Bukkit for backwards
 compatibility measures. 
 | 
static String | 
MINECRAFT | 
 The namespace representing all inbuilt keys. 
 | 
| Constructor | Description | 
|---|---|
NamespacedKey(String namespace,
             String key) | 
 Deprecated. 
 
should never be used by plugins, for internal use only!! 
 | 
NamespacedKey(Plugin plugin,
             String key) | 
 Create a key in the plugin's namespace. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
boolean | 
equals(Object obj) | 
|
String | 
getKey() | 
|
String | 
getNamespace() | 
|
int | 
hashCode() | 
|
static NamespacedKey | 
minecraft(String key) | 
 Get a key in the Minecraft namespace. 
 | 
static NamespacedKey | 
randomKey() | 
 Deprecated. 
 
should never be used by plugins, for internal use only!! 
 | 
String | 
toString() | 
public static final String MINECRAFT
public static final String BUKKIT
@Deprecated public NamespacedKey(@NotNull String namespace, @NotNull String key)
namespace - namespacekey - keypublic NamespacedKey(@NotNull
                     Plugin plugin,
                     @NotNull
                     String key)
Namespaces may only contain lowercase alphanumeric characters, periods, underscores, and hyphens.
Keys may only contain lowercase alphanumeric characters, periods, underscores, hyphens, and forward slashes.
plugin - the plugin to use for the namespacekey - the key to create@NotNull public String getNamespace()
@NotNull public String getKey()
@Deprecated @NotNull public static NamespacedKey randomKey()
BUKKIT namespace.@NotNull public static NamespacedKey minecraft(@NotNull String key)
key - the key to useCopyright © 2019. All rights reserved.