chart-barStatistics

📈 Overview

Player statistics are tracked using the PlayerStatistic enum. This structured data system separates global statistics (like gems) from mode-specific statistics (like kills or wins).

circle-info

Check the Javadocsarrow-up-right for reference.


🧮 Managing Statistics

You can read and modify player statistics using the StatisticStorage found within their PlayerData.

Accessing Player Data

First, ensure you fetch the player's data profile:

import xericker.arenalegends.playerdata.instance.PlayerData;
import xericker.arenalegends.playerdata.manager.PlayerDataManager;

PlayerData data = PlayerDataManager.getInstance().get(player);
if (data == null) return;

Reading Values

You can get global values (like currency) or game-mode specific values.

Modifying Values

You can easily add, subtract, or set a statistic's value.

Last updated