Per Dimension/Gamemode statistics and achievements

I recently started working on a plugin for spigot to so I could keep player statistics and achievements separate for gamemodes and for dimensions since we are wanting to merge our survival and creative server again using multiverse (or something similar). However spigot/bukkit seems as if all you can do is simply award and revoke an achievement for a player, you have no control over the value of each achievement and can’t even fetch a list of the players’ achievements.

Long story short, does sponge have an easy way to access and manage all of a specific users achievements and statistics. Looking at the spongapi docs I can see there are 2 methods getAchievementData and getStatisticsData to return a “copy” of the data, but I don’t see something specifically for setting the data

It’s probably difficult since afaik stats and achievements are bound to the player and the player only, meaning there is no other criteria like the player’s current dimension, gamemode etc.

What you could do though is keeping a list of achievements for each player for each dimension and when a player switches between dimensions, the corresponding list of achievements is loaded and the player’s achievements are adjusted accordingly (by granting and revoking them).

(Note: i’ve only been using achievements and dimensions in my example for simplicity. Same stuff goes for gamemodes and stats as well ofc)

I’m basically doing exactly that on spigot. when the player triggers a world or gamemode change event I replace the players current stats with a snapshot of their stats the last time they were in the respective world/gamemode. The only problem is that I can only do this with statistics only and not achievements on spigot. I assume it’s one of those things were they feel the limited access they provide is sufficient

Getting the player’s gamemode, dimension, etc seems to be be no problem with either spigot or sponge. I haven’t started coding with sponge yet due to there not being a multiverse/multiworld like plugin yet (literally the only reason we’re using spigot at the moment), it’s the ability to modify the stats and achievements in full that i was hoping someone could tell me if sponge supports (or will support)

Sounds like the sort of thing Sponge could definitely have API for. If it’s not already in the SpongeAPI mind giving us some example code / API usage for what you want?

Do you just want read-write access to the achievement data as a minimum or can you imagine something more powerful that would make it easier?