give all models @ToString
All checks were successful
Publish package to my Maven Repository / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 16s

This commit is contained in:
Lee 2024-04-17 21:22:33 +01:00
parent 57b1af849d
commit c7b3f76981
9 changed files with 21 additions and 45 deletions

@ -6,7 +6,7 @@
<groupId>xyz.mcutils</groupId> <groupId>xyz.mcutils</groupId>
<artifactId>mcutils-java-library</artifactId> <artifactId>mcutils-java-library</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.1-SNAPSHOT</version>
<properties> <properties>
<maven.compiler.source>17</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>

@ -1,9 +1,9 @@
package xyz.mcutils.models; package xyz.mcutils.models;
import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.ToString;
@Getter @ToString
public class CachedResponse { public class CachedResponse {
/** /**
@ -11,9 +11,7 @@ public class CachedResponse {
*/ */
private Cache cache; private Cache cache;
@AllArgsConstructor @Getter @ToString
@Getter
@Setter
public static class Cache { public static class Cache {
/** /**
* Whether this request is cached. * Whether this request is cached.
@ -24,35 +22,5 @@ public class CachedResponse {
* The unix timestamp of when this was cached. * The unix timestamp of when this was cached.
*/ */
private long cachedTime; private long cachedTime;
/**
* Create a new cache information object with the default values.
* <p>
* The default values are:
* <br>
* <ul>
* <li>cached: true</li>
* <li>cachedAt: {@link System#currentTimeMillis()}</li>
* </ul>
* <br>
* </p>
*
* @return the default cache information object
*/
public static Cache defaultCache() {
return new Cache(true, System.currentTimeMillis());
}
/**
* Sets if this request is cached.
*
* @param cached the new value of if this request is cached
*/
public void setCached(boolean cached) {
this.cached = cached;
if (!cached) {
cachedTime = -1;
}
}
} }
} }

@ -1,12 +1,9 @@
package xyz.mcutils.models.dns; package xyz.mcutils.models.dns;
import io.micrometer.common.lang.NonNull; import io.micrometer.common.lang.NonNull;
import lombok.AllArgsConstructor; import lombok.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Setter @Getter @Setter @Getter @ToString
@NoArgsConstructor @AllArgsConstructor @NoArgsConstructor @AllArgsConstructor
public class DNSRecord { public class DNSRecord {
/** /**

@ -2,12 +2,13 @@ package xyz.mcutils.models.mojang;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.ToString;
import xyz.mcutils.models.CachedResponse; import xyz.mcutils.models.CachedResponse;
import java.util.Map; import java.util.Map;
@AllArgsConstructor @AllArgsConstructor
@Getter @Getter @ToString
public class CachedMojangEndpointStatus extends CachedResponse { public class CachedMojangEndpointStatus extends CachedResponse {
/** /**

@ -1,11 +1,12 @@
package xyz.mcutils.models.player; package xyz.mcutils.models.player;
import lombok.Getter; import lombok.Getter;
import lombok.ToString;
import xyz.mcutils.models.CachedResponse; import xyz.mcutils.models.CachedResponse;
import java.util.UUID; import java.util.UUID;
@Getter @Getter @ToString
public class CachedPlayer extends CachedResponse { public class CachedPlayer extends CachedResponse {
/** /**

@ -2,8 +2,9 @@ package xyz.mcutils.models.player;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.ToString;
@AllArgsConstructor @Getter @AllArgsConstructor @Getter @ToString
public class CachedPlayerSkinPart { public class CachedPlayerSkinPart {
/** /**
* The bytes for the skin part * The bytes for the skin part

@ -1,11 +1,12 @@
package xyz.mcutils.models.player; package xyz.mcutils.models.player;
import lombok.Getter; import lombok.Getter;
import lombok.ToString;
import xyz.mcutils.models.CachedResponse; import xyz.mcutils.models.CachedResponse;
import java.util.UUID; import java.util.UUID;
@Getter @Getter @ToString
public class CachedUsernameToUuid extends CachedResponse { public class CachedUsernameToUuid extends CachedResponse {
/** /**
* The username of the player. * The username of the player.

@ -1,5 +1,10 @@
package xyz.mcutils.models.player; package xyz.mcutils.models.player;
import lombok.Getter;
import lombok.ToString;
@Getter
@ToString
public class Cape { public class Cape {
/** /**
* The URL of the cape * The URL of the cape

@ -2,10 +2,12 @@ package xyz.mcutils.models.player;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.ToString;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@Getter @ToString
public class Skin { public class Skin {
/** /**
* The URL for the skin * The URL for the skin