use new mojang endpoint status model
This commit is contained in:
parent
b0b45723b2
commit
034f686e08
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>xyz.mcutils</groupId>
|
||||
<artifactId>mcutils-java-library</artifactId>
|
||||
<version>1.1</version>
|
||||
<version>1.1.1</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
|
@ -2,10 +2,8 @@ package xyz.mcutils;
|
||||
|
||||
import xyz.mcutils.common.WebRequest;
|
||||
import xyz.mcutils.exception.ErrorResponse;
|
||||
import xyz.mcutils.models.mojang.CachedMojangEndpointStatus;
|
||||
import xyz.mcutils.models.player.CachedPlayer;
|
||||
import xyz.mcutils.models.cache.*;
|
||||
import xyz.mcutils.models.player.CachedPlayerSkinPart;
|
||||
import xyz.mcutils.models.player.CachedUsernameToUuid;
|
||||
import xyz.mcutils.models.player.Skin;
|
||||
import xyz.mcutils.models.server.*;
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
package xyz.mcutils.models.server;
|
||||
package xyz.mcutils.models.cache;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import xyz.mcutils.models.server.MinecraftServer;
|
||||
|
||||
@Getter
|
||||
public class CachedBedrockMinecraftServer extends MinecraftServer {
|
@ -1,7 +1,8 @@
|
||||
package xyz.mcutils.models.server;
|
||||
package xyz.mcutils.models.cache;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import xyz.mcutils.models.server.MinecraftServer;
|
||||
|
||||
@Getter
|
||||
public class CachedJavaMinecraftServer extends MinecraftServer {
|
17
src/main/java/xyz/mcutils/models/cache/CachedMojangEndpointStatus.java
vendored
Normal file
17
src/main/java/xyz/mcutils/models/cache/CachedMojangEndpointStatus.java
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
package xyz.mcutils.models.cache;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import xyz.mcutils.models.CachedResponse;
|
||||
import xyz.mcutils.models.mojang.EndpointStatus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter @ToString
|
||||
public class CachedMojangEndpointStatus extends CachedResponse {
|
||||
|
||||
/**
|
||||
* The list of endpoints and their status.
|
||||
*/
|
||||
private List<EndpointStatus> endpoints;
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package xyz.mcutils.models.player;
|
||||
package xyz.mcutils.models.cache;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import xyz.mcutils.models.CachedResponse;
|
||||
import xyz.mcutils.models.player.Cape;
|
||||
import xyz.mcutils.models.player.Skin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package xyz.mcutils.models.server;
|
||||
package xyz.mcutils.models.cache;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
@ -1,4 +1,4 @@
|
||||
package xyz.mcutils.models.player;
|
||||
package xyz.mcutils.models.cache;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
@ -1,21 +1,28 @@
|
||||
package xyz.mcutils.models.mojang;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import xyz.mcutils.models.CachedResponse;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter @ToString
|
||||
public class CachedMojangEndpointStatus extends CachedResponse {
|
||||
@Getter
|
||||
public class EndpointStatus {
|
||||
|
||||
/**
|
||||
* The list of endpoints and their status.
|
||||
* The name of the service.
|
||||
*/
|
||||
private Map<String, Status> endpoints;
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* The hostname of the service.
|
||||
*/
|
||||
private String hostname;
|
||||
|
||||
/**
|
||||
* The status of the service.
|
||||
*/
|
||||
private Status status;
|
||||
|
||||
/**
|
||||
* Statuses for the endpoint.
|
||||
*/
|
||||
public enum Status {
|
||||
/**
|
||||
* The service is online and operational.
|
@ -2,7 +2,7 @@ package xyz.mcutils;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import xyz.mcutils.models.mojang.CachedMojangEndpointStatus;
|
||||
import xyz.mcutils.models.cache.CachedMojangEndpointStatus;
|
||||
|
||||
public class MojangTests {
|
||||
|
||||
|
@ -3,9 +3,9 @@ package xyz.mcutils;
|
||||
import lombok.SneakyThrows;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import xyz.mcutils.exception.ErrorResponse;
|
||||
import xyz.mcutils.models.player.CachedPlayer;
|
||||
import xyz.mcutils.models.cache.CachedPlayer;
|
||||
import xyz.mcutils.models.player.CachedPlayerSkinPart;
|
||||
import xyz.mcutils.models.player.CachedUsernameToUuid;
|
||||
import xyz.mcutils.models.cache.CachedUsernameToUuid;
|
||||
import xyz.mcutils.models.player.Skin;
|
||||
|
||||
public class PlayerTests {
|
||||
|
@ -3,9 +3,9 @@ package xyz.mcutils;
|
||||
import lombok.SneakyThrows;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import xyz.mcutils.exception.ErrorResponse;
|
||||
import xyz.mcutils.models.server.CachedBedrockMinecraftServer;
|
||||
import xyz.mcutils.models.server.CachedJavaMinecraftServer;
|
||||
import xyz.mcutils.models.server.CachedServerBlockedStatus;
|
||||
import xyz.mcutils.models.cache.CachedBedrockMinecraftServer;
|
||||
import xyz.mcutils.models.cache.CachedJavaMinecraftServer;
|
||||
import xyz.mcutils.models.cache.CachedServerBlockedStatus;
|
||||
import xyz.mcutils.models.server.CachedServerIcon;
|
||||
|
||||
public class ServerTests {
|
||||
|
Loading…
Reference in New Issue
Block a user