pls work first try

This commit is contained in:
Lee
2024-04-17 21:06:43 +01:00
commit ecde2bb2a7
30 changed files with 1258 additions and 0 deletions

View File

@ -0,0 +1,62 @@
package xyz.mcutils.models.player;
import lombok.Getter;
import xyz.mcutils.models.CachedResponse;
import java.util.UUID;
@Getter
public class CachedPlayer extends CachedResponse {
/**
* The UUID of the player
*/
private UUID uniqueId;
/**
* The trimmed UUID of the player
*/
private String trimmedUniqueId;
/**
* The username of the player
*/
private String username;
/**
* The skin of the player, null if the
* player does not have a skin
*/
private Skin skin;
/**
* The cape of the player, null if the
* player does not have a cape
*/
private Cape cape;
/**
* The raw properties of the player
*/
private ProfileProperty[] rawProperties;
/**
* A profile property for the player.
*/
private static class ProfileProperty {
/**
* The name of the property.
*/
private String name;
/**
* The base64 value of the property.
*/
private String value;
/**
* Whether the property is signed.
*/
private boolean signed;
}
}

View File

@ -0,0 +1,12 @@
package xyz.mcutils.models.player;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor @Getter
public class CachedPlayerSkinPart {
/**
* The bytes for the skin part
*/
private byte[] partBytes;
}

View File

@ -0,0 +1,19 @@
package xyz.mcutils.models.player;
import lombok.Getter;
import xyz.mcutils.models.CachedResponse;
import java.util.UUID;
@Getter
public class CachedUsernameToUuid extends CachedResponse {
/**
* The username of the player.
*/
private String username;
/**
* The unique id of the player.
*/
private UUID uniqueId;
}

View File

@ -0,0 +1,8 @@
package xyz.mcutils.models.player;
public class Cape {
/**
* The URL of the cape
*/
private String url;
}

View File

@ -0,0 +1,51 @@
package xyz.mcutils.models.player;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.HashMap;
import java.util.Map;
public class Skin {
/**
* The URL for the skin
*/
private String url;
/**
* The model for the skin
*/
private Model model;
/**
* The legacy status of the skin
*/
private boolean legacy;
/**
* The part URLs of the skin
*/
private Map<String, String> parts = new HashMap<>();
/**
* The model of the skin.
*/
public enum Model {
DEFAULT,
SLIM
}
@AllArgsConstructor
@Getter
public enum SkinPart {
HEAD("head"),
FACE("face"),
BODY("body");
/**
* The name of the skin part
*/
private final String name;
}
}