52 lines
1.1 KiB
Java
52 lines
1.1 KiB
Java
package mc.protocol.dto;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import lombok.Data;
|
|
import lombok.ToString;
|
|
import mc.protocol.text.Text;
|
|
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
|
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
@Data
|
|
@ToString(exclude = "faviconBase64")
|
|
public class ServerInfo {
|
|
|
|
private Version version;
|
|
|
|
@JsonProperty("players")
|
|
private PlayersInfo playersInfo;
|
|
|
|
private Text description;
|
|
|
|
@JsonProperty("favicon")
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
private String faviconBase64;
|
|
|
|
@Data
|
|
public static class Version {
|
|
private String name;
|
|
private int protocol;
|
|
}
|
|
|
|
@Data
|
|
public static class PlayersInfo {
|
|
|
|
private int max;
|
|
|
|
private int online;
|
|
|
|
@JsonProperty("sample")
|
|
private List<SamplePlayer> samplePlayers;
|
|
}
|
|
|
|
@Data
|
|
public static class SamplePlayer {
|
|
private UUID id;
|
|
private String name;
|
|
}
|
|
}
|