Package com.comphenix.protocol.wrappers
Class WrappedProfilePublicKey
java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedProfilePublicKey
A wrapper around the profile public key.
- Since:
- 1.19
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA wrapper around the data stored in a profile key. -
Field Summary
Fields inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
handle, handleType -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new profile public key wrapper holding the given key data.WrappedProfilePublicKey(Object handle) Constructs a new profile public key wrapper directly from a nms ProfilePublicKey object. -
Method Summary
Modifier and TypeMethodDescriptionGet a wrapper around the key data stored in this public key.static WrappedProfilePublicKeyofPlayer(org.bukkit.entity.Player player) Retrieves the profile public key from the given player instance.voidSets the data of this key.Methods inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
equals, getHandle, getHandleType, hashCode, setHandle, toString
-
Constructor Details
-
WrappedProfilePublicKey
Constructs a new profile public key wrapper directly from a nms ProfilePublicKey object.- Parameters:
handle- the handle to create the wrapper from.
-
WrappedProfilePublicKey
Constructs a new profile public key wrapper holding the given key data.- Parameters:
keyData- the data of the key.
-
-
Method Details
-
ofPlayer
Retrieves the profile public key from the given player instance.- Parameters:
player- the player to get the key of.- Returns:
- a wrapper around the public key of the given player.
-
getKeyData
Get a wrapper around the key data stored in this public key.- Returns:
- the data of this key.
-
setKeyData
Sets the data of this key. Note that changing the key data might lead to unexpected issues with the server, for example chat message validation to fail.- Parameters:
keyData- the new data of this key.
-