Add persistent player statistics tracking
Introduced the `PlayerStat` system to persist player statistics across sessions. Enhanced player management by linking `PlayerStat` with teams and saving/updating stats periodically. Refactored related methods to support the new functionality and ensure data integrity.
This commit is contained in:
@@ -30,10 +30,10 @@ public class TeamPlayer {
|
||||
private GameClass gameClass;
|
||||
private boolean isDead = false;
|
||||
|
||||
protected TeamPlayer(Player player, Team team) {
|
||||
protected TeamPlayer(Player player, Team team, PlayerStat playerStat) {
|
||||
this.uuid = player.getUniqueId();
|
||||
this.team = team;
|
||||
this.playerStat = new PlayerStat(uuid, player.getName());
|
||||
this.playerStat = playerStat;
|
||||
}
|
||||
|
||||
public void respawn(@NotNull Player player, @NotNull WorldBorderApi worldBorderApi, @NotNull GamePhase gamePhase) {
|
||||
|
||||
Reference in New Issue
Block a user