package cz.marwland.mc.features.stats; import org.bukkit.entity.Player; public class PlayerStats { private final Player player; private volatile int killsSinceRecord = 0; private volatile int deathsSinceRecord = 0; public PlayerStats(Player player) { this.player = player; } public void addKill() { this.killsSinceRecord++; } public void addDeath() { this.deathsSinceRecord++; } public int getNewKills() { return this.killsSinceRecord; } public int getNewDeaths() { return this.deathsSinceRecord; } public void reset() { this.deathsSinceRecord = 0; this.killsSinceRecord = 0; } public Player getPlayer() { return this.player; } }