public class NameKey
extends java.lang.Object
Constructor | Description |
---|---|
NameKey(java.lang.String key) |
|
NameKey(java.lang.String namespace,
java.lang.String key) |
|
NameKey(net.minecraft.server.v1_16_R3.MinecraftKey from) |
Generates a
NameKey |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
getKey() |
|
net.minecraft.server.v1_16_R3.MinecraftKey |
getMinecraftKey() |
|
java.lang.String |
getNamespace() |
|
boolean |
isSimilar(NameKey anotherNameKey) |
Compares to another key
|
java.lang.String |
toString() |
public NameKey(java.lang.String namespace, java.lang.String key)
namespace
- The namespace, choose something representing your plugin/projectkey
- The Unique key inside your namespacepublic NameKey(java.lang.String key)
key
- The key inside the default namespace "minecraft" or a NameSpacedKey seperated by a colonpublic NameKey(net.minecraft.server.v1_16_R3.MinecraftKey from)
NameKey
from
- public java.lang.String getNamespace()
public java.lang.String getKey()
public boolean isSimilar(NameKey anotherNameKey)
anotherNameKey
- NameKey to compare topublic net.minecraft.server.v1_16_R3.MinecraftKey getMinecraftKey()
MinecraftKey
representation of this NameKeypublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object