2024-04-13 17:40:03 +01:00
|
|
|
package cc.fascinated.model.token;
|
2024-04-10 07:43:38 +01:00
|
|
|
|
2024-04-11 00:49:16 +01:00
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
2024-04-10 07:43:38 +01:00
|
|
|
import lombok.Getter;
|
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
|
|
@Getter @NoArgsConstructor
|
2024-04-13 17:40:03 +01:00
|
|
|
public class MojangUsernameToUuidToken {
|
2024-04-10 07:43:38 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The UUID of the player.
|
|
|
|
*/
|
2024-04-11 00:49:16 +01:00
|
|
|
@JsonProperty("id")
|
|
|
|
private String uuid;
|
2024-04-10 07:43:38 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the player.
|
|
|
|
*/
|
2024-04-11 00:49:16 +01:00
|
|
|
@JsonProperty("name")
|
|
|
|
private String username;
|
2024-04-10 07:43:38 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check if the profile is valid.
|
|
|
|
*
|
|
|
|
* @return if the profile is valid
|
|
|
|
*/
|
|
|
|
public boolean isValid() {
|
2024-04-11 00:49:16 +01:00
|
|
|
return uuid != null && username != null;
|
2024-04-10 07:43:38 +01:00
|
|
|
}
|
|
|
|
}
|