PlayerStatsSync v1.1.0 — Release Notes
Overview
This release is a major update focused on reliability, extensibility, and integration. It introduces additive conflict resolution, a public developer API, PlaceholderAPI support, and several quality-of-life improvements to the sync command.
New Features
Additive Conflict Resolution Stats and objectives can now define how conflicts are handled when a value already exists in the database. This is especially important for multi-server setups where last-write-wins could silently wipe out increments from another server.
Four strategies are available per stat and objective in config.yml:
- last-write-wins — always overwrite (default, previous behavior)
- additive — keep the higher value, safe for monotonic counters like kills and deaths
- max — same as additive
- min — keep the lower value, useful for best-time tracking
Kill, death, and playtime objectives default to additive. Money/balance defaults to last-write-wins.
PlaceholderAPI Integration PlayerStatsSync now supports PlaceholderAPI as an optional dependency. If PlaceholderAPI is installed, the following placeholders are available immediately with no additional configuration:
- %playerstatssync_stat_<key>% — any synced stat, e.g. %playerstatssync_stat_deaths%
- %playerstatssync_stat_kill_entity_creeper% — per-entity kill counts
- %playerstatssync_obj_<name>% — scoreboard objective values
- %playerstatssync_player_name% — last known player name from the database
Placeholders return an empty string if the player has no data yet. The plugin starts and runs normally if PlaceholderAPI is not installed.
Developer Read API Other plugins can now read synced stats and objectives directly without writing their own SQL queries:
java
long deaths = PlayerStatsSyncAPI.getStat(uuid, "deaths");
long balance = PlayerStatsSyncAPI.getObjective(uuid, "money");
String name = PlayerStatsSyncAPI.getPlayerName(uuid);
boolean tracked = PlayerStatsSyncAPI.isPlayerTracked(uuid);
All methods return PlayerStatsSyncAPI.NOT_FOUND (Long.MIN_VALUE) if the player has no data. Calls are synchronous DB reads — run them off the main thread.
Selector Support for /pss sync The sync command now accepts Minecraft entity selectors in addition to player names:
/pss sync — sync all online players
/pss sync Shin_Jin_Jin — sync a single player
/pss sync @a — sync all online players via selector
/pss sync @p — sync the nearest player
/pss sync @r — sync a random online player
/pss sync @a[gamemode=survival] — sync all survival players
Tab completion now suggests @a, @r, @p, @e alongside online player names.
Safe Config Updates When the plugin updates, new config keys are now merged into the existing config.yml automatically. The statistics and objectives sections are never touched during an update — your custom stat and objective definitions are always preserved.
Changes
- /pss sync <player> now supports both exact player names and entity selectors
- /pss sync without arguments still syncs all online players as before
- saveScoresBatch and saveStatsBatch now accept conflict resolution strategy per entry
- config.yml defaults updated: kills, deaths, playtime set to additive
Upgrade Notes
- Drop the new JAR into your plugins/ folder and restart. No manual database changes required.
- Existing configs are fully compatible. New keys (conflict-resolution) will be added automatically on first start.
- If you use PlaceholderAPI, no additional setup is needed — placeholders register automatically on enable.