Files
Backend/src/main/java/cc/fascinated/model/mojang/MojangUsernameToUuid.java

31 lines
599 B
Java
Raw Normal View History

2024-04-10 07:43:38 +01:00
package cc.fascinated.model.mojang;
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
public class MojangUsernameToUuid {
/**
* 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
}
}