Class GameProfile.Property

java.lang.Object
org.geysermc.mcprotocollib.auth.GameProfile.Property
Enclosing class:
GameProfile

public static class GameProfile.Property extends Object
A property belonging to a profile.
  • Constructor Details

    • Property

      public Property(String name, String value)
      Creates a new Property instance.
      Parameters:
      name - Name of the property.
      value - Value of the property.
    • Property

      public Property(String name, String value, String signature)
      Creates a new Property instance.
      Parameters:
      name - Name of the property.
      value - Value of the property.
      signature - Signature used to verify the property.
  • Method Details

    • getName

      public String getName()
      Gets the name of the property.
      Returns:
      The property's name.
    • getValue

      public String getValue()
      Gets the value of the property.
      Returns:
      The property's value.
    • hasSignature

      public boolean hasSignature()
      Gets whether this property has a signature to verify it.
      Returns:
      Whether this property is signed.
    • getSignature

      public String getSignature()
      Gets the signature used to verify the property.
      Returns:
      The property's signature.
    • isSignatureValid

      public boolean isSignatureValid(PublicKey key) throws IllegalStateException
      Gets whether this property's signature is valid.
      Parameters:
      key - Public key to validate the signature against.
      Returns:
      Whether the signature is valid.
      Throws:
      IllegalStateException - If the signature could not be validated.
    • toString

      public String toString()
      Overrides:
      toString in class Object