LoMines/src/main/java/dev/loki/lomines/data/stats/LeaderboardEntry.java
loki5512344 f4e9458544 refactor: migrate package from com.loki to dev.loki
- Change base package from com.loki to dev.loki across all Java files
- Update plugin.yml main class path
- Fix ConfigParseException imports in test files
- Update build.gradle.kts relocate patterns
- Add missing imports in ConfigLoaderTest.java
- Update TODO.md with current status

BREAKING CHANGE: Package namespace changed from com.loki to dev.loki
2026-05-31 21:34:44 +02:00

29 lines
879 B
Java

package dev.loki.lomines.data.stats;
import java.util.Objects;
import java.util.UUID;
/**
* Immutable data class representing a single entry in the leaderboard.
* Contains a player's UUID and their block count.
*/
public record LeaderboardEntry(UUID playerId, long count) {
public LeaderboardEntry(UUID playerId, long count) {
this.playerId = Objects.requireNonNull(playerId, "playerId cannot be null");
this.count = count;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
LeaderboardEntry that = (LeaderboardEntry) o;
return count == that.count && playerId.equals(that.playerId);
}
@Override
public String toString() {
return "LeaderboardEntry{playerId=" + playerId + ", count=" + count + "}";
}
}