Package com.comphenix.protocol.wrappers
Class MinecraftKey
java.lang.Object
com.comphenix.protocol.wrappers.MinecraftKey
Represents a MinecraftKey in 1.9.
Keys are in the format prefix:key
-
Constructor Summary
ConstructorsConstructorDescriptionMinecraftKey(String key) Constructs a new key with minecraft prefix and a key.MinecraftKey(String prefix, String key) Constructs a new key with a given prefix and key. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic MinecraftKeyDeprecated.This isn't accurate in all casesstatic MinecraftKeyfromHandle(Object handle) Creates a MinecraftKey wrapper from a Minecraft handle.static EquivalentConverter<MinecraftKey> Deprecated.This isn't accurate in all casesGets the full key of this MinecraftKey.getKey()Gets the key of this MinecraftKey.Gets the prefix of this MinecraftKey.inthashCode()
-
Constructor Details
-
MinecraftKey
Constructs a new key with a given prefix and key.- Parameters:
prefix- The prefix, usually minecraft.key- The key, the part we care about
-
MinecraftKey
Constructs a new key with minecraft prefix and a key.- Parameters:
key- The key
-
-
Method Details
-
fromHandle
Creates a MinecraftKey wrapper from a Minecraft handle.- Parameters:
handle- The handle- Returns:
- The resulting key
-
fromEnum
Deprecated.This isn't accurate in all casesCreates a MinecraftKey wrapper from an Enum constant. The resulting key is lower case, with underscores replaced by periods.- Parameters:
value- The value- Returns:
- The resulting key
-
getPrefix
Gets the prefix of this MinecraftKey. It is minecraft by default.- Returns:
- The prefix
-
getKey
Gets the key of this MinecraftKey. It is generally the important part.- Returns:
- The key
-
getFullKey
Gets the full key of this MinecraftKey. It is in the format ofprefix:key- Returns:
- The full key
-
getEnumFormat
Deprecated.This isn't accurate in all casesReturns this key back into Enum format, upper case with periods replaced by underscores.- Returns:
- The enum format
-
equals
-
hashCode
public int hashCode() -
getConverter
-