fix username to uuid cache
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Has been cancelled

This commit is contained in:
Lee
2024-04-13 17:29:32 +01:00
parent bda70b19a8
commit a966977d82
2 changed files with 11 additions and 4 deletions

View File

@ -14,18 +14,24 @@ import java.util.UUID;
@ToString
@RedisHash(value = "playerName", timeToLive = 60L * 60L * 6) // 6 hours (in seconds)
public final class CachedPlayerName extends CachedResponse {
/**
* The id of the player.
*/
@Id private final String id;
/**
* The username of the player.
*/
@Id private final String username;
private final String username;
/**
* The unique id of the player.
*/
private final UUID uniqueId;
public CachedPlayerName(String username, UUID uniqueId) {
public CachedPlayerName(String id, String username, UUID uniqueId) {
super(CacheInformation.defaultCache());
this.id = id;
this.username = username;
this.uniqueId = uniqueId;
}