
FoStatistics
Edit player's statistics live in-game without any hassle.
Описание

FoStatistics gives server staff a controlled way to view and adjust player Minecraft statistics without editing player data by hand. It is built for admins who need quick fixes, corrections, or controlled stat changes through commands and a simple editor.
Features
- View exact player statistic values from in-game commands.
- Set, add, or take statistic amounts with validation and a configurable maximum.
- Edit known offline players while blocking typo-created unknown targets by default.
- Use typed statistic keys for blocks, items, and entities, such as
mine_block:stoneorkill_entity:zombie. - Handle
time_playedwith readable units like30s,10m,1h,1d, or1w. - Manage core settings from an admin GUI, including offline edits, unknown targets, max statistic amount, and file logging.

Commands
/fostatisticsadmin view <statistic> <player>- View a player's current statistic value./fostatisticsadmin setstatistic <statistic> <player> <amount>- Set a statistic to an exact value./fostatisticsadmin addstatistic <statistic> <player> <amount>- Increase a statistic safely./fostatisticsadmin takestatistic <statistic> <player> <amount>- Decrease a statistic without dropping below zero./fostatisticsadmin editor- Open the admin settings editor./fostatisticsadmin reload- Reload config, messages, editor, and logging./fostatisticsadmin version- Check the installed version and update status.
The command also has the alias /statisticsadmin.
Permissions
fostatistics.admin- Allows access to FoStatistics admin commands and the editor.
Developer API
Compile against the matching jar (provided in Maven, compileOnly in Gradle); install it locally if needed. Declare FoStatistics in your plugin metadata (softdepend for an optional integration).
<dependency>
<groupId>me.foesio</groupId>
<artifactId>FoStatistics</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>
import me.foesio.foStatistics.api.FoStatisticsService;
import me.foesio.foStatistics.api.StatisticTarget;
import me.foesio.foStatistics.api.StatisticEditAction;
import org.bukkit.Statistic;
import me.foesio.foStatistics.api.event.FoStatisticEditedEvent;
FoStatisticsService api = Bukkit.getServicesManager().load(FoStatisticsService.class);
if (api != null) api.edit(this, player, StatisticTarget.of(Statistic.JUMP), StatisticEditAction.ADD, 1);
@EventHandler
public void onFoStatisticEditedEvent(FoStatisticEditedEvent event) {
Bukkit.getLogger().info(event.getClass().getSimpleName());
}
API methods (overloads grouped):
FoStatisticsService:edit.
Other API types: StatisticEditAction, StatisticEditResult, StatisticTarget.
Events: FoStatisticEditedEvent.
Browse API and event source for signatures and event details.
