Class WrappedProfilePublicKey

java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedProfilePublicKey

public class WrappedProfilePublicKey extends AbstractWrapper
A wrapper around the profile public key.
Since:
1.19
  • Constructor Details

    • WrappedProfilePublicKey

      public WrappedProfilePublicKey(Object handle)
      Constructs a new profile public key wrapper directly from a nms ProfilePublicKey object.
      Parameters:
      handle - the handle to create the wrapper from.
    • WrappedProfilePublicKey

      public WrappedProfilePublicKey(WrappedProfilePublicKey.WrappedProfileKeyData keyData)
      Constructs a new profile public key wrapper holding the given key data.
      Parameters:
      keyData - the data of the key.
  • Method Details

    • ofPlayer

      @Nullable public static WrappedProfilePublicKey ofPlayer(org.bukkit.entity.Player player)
      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

      public void setKeyData(WrappedProfilePublicKey.WrappedProfileKeyData keyData)
      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.